From 6772831200d14c2436aea2d0c837f40dbf12156f Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Sun, 26 Sep 2021 13:11:47 +0200 Subject: 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
 for JS w/ language-js class

* Remove 
 for HTML w/ language-html class

* Remove 
 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
---
 files/fr/web/api/subtlecrypto/digest/index.html | 20 +++++++++-----------
 files/fr/web/api/subtlecrypto/index.html        |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

(limited to 'files/fr/web/api/subtlecrypto')

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
 
 

Syntaxe

-
const digest = crypto.subtle.digest(algorithm, data);
+
const digest = crypto.subtle.digest(algorithm, data);
 

Paramètres

@@ -43,8 +43,8 @@ translation_of: Web/API/SubtleCrypto/digest

Cet algorithme est spécifié dans FIPS 180-4, section 6.1, et produit un résultat de 160 bits de long.

-
-

Avertissement: Cet algorithme est maintenant considérer comme vulnérable et ne doit pas être utilisé pour des applications cryptographiques.

+
+

Attention : Cet algorithme est maintenant considérer comme vulnérable et ne doit pas être utilisé pour des applications cryptographiques.

SHA-256

@@ -59,8 +59,8 @@ translation_of: Web/API/SubtleCrypto/digest

Cet algorithme est spécifié dans FIPS 180-4, section 6.4, et produit un résultat de 512 bits de long.

-
-

Indice: Si vous cherchez à créer un condensé pour authentifié un message (HMAC), vous aurez plutôt besoin de SubtleCrypto.sign().

+
+

Note : Si vous cherchez à créer un condensé pour authentifié un message (HMAC), vous aurez plutôt besoin de SubtleCrypto.sign().

Exemples

@@ -69,7 +69,7 @@ translation_of: Web/API/SubtleCrypto/digest

Cet exemple encode un message, puis calcule le condensé avec SHA-256, enfin affiche la longueur du résultat.

-
const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
+
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);
 
 

Le condensé est retourné sous forme d'un ArrayBuffer, mais la comparaison et l'affichage se fait souvent avec des chaînes hexadécimales. Cet exemple calcule un condensé puis converti l'ArrayBuffer vers une chaîne hexadécimale.

-
const text = 'Un obscur message venant du le système S-K, votre majesté. Ses habitants le nomment la planète Terre.';
+
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);
 
 

Compatibilité des navigateurs

- -

{{Compat("api.SubtleCrypto.digest")}}

-
-

 Dans Chrome 60, une fonctionnalité a été ajoutée qui désactive crypto.subtle pour les connexions non TLS.

+
+

Note : Dans Chrome 60, une fonctionnalité a été ajoutée qui désactive crypto.subtle pour les connexions non TLS.

Voir aussi

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 ---
{{APIRef("Web Crypto API")}}{{SecureContext_header}}
-

The SubtleCrypto interface of the Web Crypto API provides a number of low-level cryptographic functions. Access to the features of SubtleCrypto is obtained through the {{domxref("Crypto.subtle", "subtle")}} property of the {{domxref("Crypto")}} object you get from {{domxref("Window.crypto")}}.

+

The SubtleCrypto interface of the Web Crypto API provides a number of low-level cryptographic functions. Access to the features of SubtleCrypto is obtained through the {{domxref("Crypto.subtle", "subtle")}} property of the {{domxref("Crypto")}} object you get from {{domxref("Window.crypto")}}.

Warning: 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.

-- cgit v1.2.3-54-g00ecf