diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index c16140b17f6..0219c01e02c 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -2,6 +2,9 @@ -* `algorithm` {string|Algorithm} +* `algorithm` {string|Algorithm|CShakeParams} * `data` {ArrayBuffer|TypedArray|DataView|Buffer} * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success. @@ -812,6 +823,8 @@ with an {ArrayBuffer} containing the computed digest. If `algorithm` is provided as a {string}, it must be one of: +* `'cSHAKE128'`[^modern-algos] +* `'cSHAKE256'`[^modern-algos] * `'SHA-1'` * `'SHA-256'` * `'SHA-384'` @@ -1423,6 +1436,53 @@ the message. The Node.js Web Crypto API implementation only supports zero-length context which is equivalent to not providing context at all. +### Class: `CShakeParams` + + + +#### `cShakeParams.customization` + + + +* Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined} + +The `customization` member represents the customization string. +The Node.js Web Crypto API implementation only supports zero-length customization +which is equivalent to not providing customization at all. + +#### `cShakeParams.functionName` + + + +* Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined} + +The `functionName` member represents represents the function name, used by NIST to define +functions based on cSHAKE. +The Node.js Web Crypto API implementation only supports zero-length functionName +which is equivalent to not providing functionName at all. + +#### `cShakeParams.length` + + + +* Type: {number} represents the requested output length in bits. + +#### `cShakeParams.name` + + + +* Type: {string} Must be `'cSHAKE128'`[^modern-algos] or `'cSHAKE256'`[^modern-algos] + ### Class: `EcdhKeyDeriveParams`