diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index c8ad24668e33dc..3ea35da29b2d9f 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -2,6 +2,9 @@ -* `algorithm` {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params} +* `algorithm` {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params|Argon2Params} * `baseKey` {CryptoKey} * `length` {number|null} **Default:** `null` * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success. @@ -900,6 +918,9 @@ containing the generated data. The algorithms currently supported include: +* `'Argon2d'`[^modern-algos] +* `'Argon2i'`[^modern-algos] +* `'Argon2id'`[^modern-algos] * `'ECDH'` * `'HKDF'` * `'PBKDF2'` @@ -911,6 +932,9 @@ The algorithms currently supported include: -* `algorithm` {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params} +* `algorithm` {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params|Argon2Params} * `baseKey` {CryptoKey} * `derivedKeyAlgorithm` {string|Algorithm|HmacImportParams|AesDerivedKeyParams} * `extractable` {boolean} @@ -940,6 +964,9 @@ generate raw keying material, then passing the result into the The algorithms currently supported include: +* `'Argon2d'`[^modern-algos] +* `'Argon2i'`[^modern-algos] +* `'Argon2id'`[^modern-algos] * `'ECDH'` * `'HKDF'` * `'PBKDF2'` @@ -1235,7 +1262,7 @@ as the given `format` to create a {CryptoKey} instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. If the import is successful, the returned promise will be resolved with the created {CryptoKey}. -If importing a `'PBKDF2'` key, `extractable` must be `false`. +If importing KDF algorithm keys, `extractable` must be `false`. The algorithms currently supported include: @@ -1246,6 +1273,9 @@ The algorithms currently supported include: | `'AES-GCM'` | | | ✔ | ✔ | ✔ | | | | `'AES-KW'` | | | ✔ | ✔ | ✔ | | | | `'AES-OCB'`[^modern-algos] | | | ✔ | | ✔ | | | +| `'Argon2d'`[^modern-algos] | | | | | ✔ | | | +| `'Argon2i'`[^modern-algos] | | | | | ✔ | | | +| `'Argon2id'`[^modern-algos] | | | | | ✔ | | | | `'ChaCha20-Poly1305'`[^modern-algos] | | | ✔ | | ✔ | | | | `'ECDH'` | ✔ | ✔ | ✔ | ✔ | | ✔ | | | `'ECDSA'` | ✔ | ✔ | ✔ | ✔ | | ✔ | | @@ -1666,6 +1696,90 @@ added: v15.0.0 * Type: {string} Must be one of `'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`, or `'AES-KW'` +### Class: `Argon2Params` + + + +#### `argon2Params.associatedData` + + + +* Type: {ArrayBuffer|TypedArray|DataView|Buffer} + +Represents the optional associated data. + +#### `argon2Params.memory` + + + +* Type: {number} + +Represents the memory size in kibibytes. It must be at least 8 times the degree of parallelism. + +#### `argon2Params.name` + + + +* Type: {string} Must be one of `'Argon2d'`, `'Argon2i'`, or `'Argon2id'`. + +#### `argon2Params.nonce` + + + +* Type: {ArrayBuffer|TypedArray|DataView|Buffer} + +Represents the nonce, which is a salt for password hashing applications. + +#### `argon2Params.parallelism` + + + +* Type: {number} + +Represents the degree of parallelism. + +#### `argon2Params.passes` + + + +* Type: {number} + +Represents the number of passes. + +#### `argon2Params.secretValue` + + + +* Type: {ArrayBuffer|TypedArray|DataView|Buffer} + +Represents the optional secret value. + +#### `argon2Params.version` + + + +* Type: {number} + +Represents the Argon2 version number. The default and currently only defined version is `19` (`0x13`). + ### Class: `ContextParams`