aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/subtlecrypto
diff options
context:
space:
mode:
authorSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-26 13:11:47 +0200
committerGitHub <noreply@github.com>2021-09-26 13:11:47 +0200
commit6772831200d14c2436aea2d0c837f40dbf12156f (patch)
treee41b587ce1834baf8c737454c0ae110ebc8208ca /files/fr/web/api/subtlecrypto
parent707941dbecfb0cc1e75dd32d2dacac4d1845bf2c (diff)
downloadtranslated-content-6772831200d14c2436aea2d0c837f40dbf12156f.tar.gz
translated-content-6772831200d14c2436aea2d0c837f40dbf12156f.tar.bz2
translated-content-6772831200d14c2436aea2d0c837f40dbf12156f.zip
Prepare Web API section for Markdown conversion (#2464)
* Remove summary classes and ids * Remove unecessary hidden * Remove useless span filled with useless attributes / ids * Remove useless font * Remove notranslate * Remove id in other elements than headings * Remove name attributes * Remove <pre><code> for JS w/ language-js class * Remove <pre><code> for HTML w/ language-html class * Remove <pre><code> for other lang w/ language-* class * Rm highlighted line in code samples * fix links, internal, external, absolute URLs * missing file from last commit * Fix styles errors apart from table + some classes * Fix notes and warnings (+ some other :x) * fix typo during merge which broke a doc * aand forgot a conflict * fix remaining classes of errors except dls and images * Fix dls * Fix images (deki/mozillademos) and remaining style issues * Remove script tag from svg file * Remove script tag from svg fileS * Compress SVG files for CI
Diffstat (limited to 'files/fr/web/api/subtlecrypto')
-rw-r--r--files/fr/web/api/subtlecrypto/digest/index.html20
-rw-r--r--files/fr/web/api/subtlecrypto/index.html2
2 files changed, 10 insertions, 12 deletions
diff --git a/files/fr/web/api/subtlecrypto/digest/index.html b/files/fr/web/api/subtlecrypto/digest/index.html
index 091a59de28..eee3e4668d 100644
--- a/files/fr/web/api/subtlecrypto/digest/index.html
+++ b/files/fr/web/api/subtlecrypto/digest/index.html
@@ -11,7 +11,7 @@ translation_of: Web/API/SubtleCrypto/digest
<h2 id="Syntaxe">Syntaxe</h2>
-<pre class="syntaxbox notranslate">const digest = <em>crypto</em><code>.subtle.digest(<em>algorithm</em>, <em>data</em>)</code>;
+<pre class="syntaxbox">const digest = <em>crypto</em><code>.subtle.digest(<em>algorithm</em>, <em>data</em>)</code>;
</pre>
<h3 id="Paramètres">Paramètres</h3>
@@ -43,8 +43,8 @@ translation_of: Web/API/SubtleCrypto/digest
<p>Cet algorithme est spécifié dans <a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS 180-4</a>, section 6.1, et produit un résultat de 160 bits de long.</p>
-<div class="blockIndicator warning">
-<p><strong>Avertissement:</strong> Cet algorithme est maintenant considérer comme vulnérable et ne doit pas être utilisé pour des applications cryptographiques.</p>
+<div class="warning">
+<p><strong>Attention :</strong> Cet algorithme est maintenant considérer comme vulnérable et ne doit pas être utilisé pour des applications cryptographiques.</p>
</div>
<h3 id="SHA-256">SHA-256</h3>
@@ -59,8 +59,8 @@ translation_of: Web/API/SubtleCrypto/digest
<p>Cet algorithme est spécifié dans <a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS 180-4</a>, section 6.4, et produit un résultat de 512 bits de long.</p>
-<div class="blockIndicator note">
-<p>Indice: Si vous cherchez à créer un condensé pour authentifié un message (<a href="/fr/docs/Glossary/HMAC">HMAC</a>), vous aurez plutôt besoin de <a href="/en-US/docs/Web/API/SubtleCrypto/sign#HMAC">SubtleCrypto.sign()</a>.</p>
+<div class="note">
+<p><strong>Note :</strong> Si vous cherchez à créer un condensé pour authentifié un message (<a href="/fr/docs/Glossary/HMAC">HMAC</a>), vous aurez plutôt besoin de <a href="/en-US/docs/Web/API/SubtleCrypto/sign#HMAC">SubtleCrypto.sign()</a>.</p>
</div>
<h2 id="Exemples">Exemples</h2>
@@ -69,7 +69,7 @@ translation_of: Web/API/SubtleCrypto/digest
<p>Cet exemple encode un message, puis calcule le condensé avec SHA-256, enfin affiche la longueur du résultat.</p>
-<pre class="brush: js notranslate">const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
+<pre class="brush: js">const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
async function digestMessage(message) {
const encoder = new TextEncoder();
@@ -86,7 +86,7 @@ console.log(digestBuffer.byteLength);
<p>Le condensé est retourné sous forme d'un <code>ArrayBuffer</code>, mais la comparaison et l'affichage se fait souvent avec des chaînes hexadécimales. Cet exemple calcule un condensé puis converti l'<code>ArrayBuffer</code> vers une chaîne hexadécimale.</p>
-<pre class="brush: js notranslate">const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
+<pre class="brush: js">const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
async function digestMessage(message) {
const msgUint8 = new TextEncoder().encode(message); // encode comme (utf-8) Uint8Array
@@ -119,12 +119,10 @@ console.log(digestHex);
<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-
<p>{{Compat("api.SubtleCrypto.digest")}}</p>
-<div class="blockIndicator note">
-<p> Dans Chrome 60, une fonctionnalité a été ajoutée qui désactive <strong>crypto.subtle</strong> pour les connexions non TLS.</p>
+<div class="note">
+<p><strong>Note :</strong> Dans Chrome 60, une fonctionnalité a été ajoutée qui désactive <strong>crypto.subtle</strong> pour les connexions non TLS.</p>
</div>
<h2 id="Voir_aussi">Voir aussi</h2>
diff --git a/files/fr/web/api/subtlecrypto/index.html b/files/fr/web/api/subtlecrypto/index.html
index 6788ee5bdb..b9cca851e9 100644
--- a/files/fr/web/api/subtlecrypto/index.html
+++ b/files/fr/web/api/subtlecrypto/index.html
@@ -16,7 +16,7 @@ translation_of: Web/API/SubtleCrypto
---
<div>{{APIRef("Web Crypto API")}}{{SecureContext_header}}</div>
-<p><span class="seoSummary">The <code><strong>SubtleCrypto</strong></code> interface of the <a href="/en-US/docs/Web/API/Web_Crypto_API">Web Crypto API</a> provides a number of low-level cryptographic functions. Access to the features of <code>SubtleCrypto</code> is obtained through the {{domxref("Crypto.subtle", "subtle")}} property of the {{domxref("Crypto")}} object you get from {{domxref("Window.crypto")}}.</span></p>
+<p>The <code><strong>SubtleCrypto</strong></code> interface of the <a href="/en-US/docs/Web/API/Web_Crypto_API">Web Crypto API</a> provides a number of low-level cryptographic functions. Access to the features of <code>SubtleCrypto</code> is obtained through the {{domxref("Crypto.subtle", "subtle")}} property of the {{domxref("Crypto")}} object you get from {{domxref("Window.crypto")}}.</p>
<div class="warning">
<p><strong>Warning:</strong> This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.</p>