{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.0.json","id":"webcrypto","path":"/webcrypto","type":"module","module":"webcrypto","title":"Web Crypto API","introducedIn":"v15.0.0","sourceLink":null,"stability":{"index":"2","description":"Stable"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.9.0"],"prUrl":"https://github.com/nodejs/node/pull/62183","commit":null,"description":"TurboSHAKE and KangarooTwelve algorithms are now supported."},{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59544","commit":null,"description":"Argon2 algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59539","commit":null,"description":"AES-OCB algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59569","commit":null,"description":"ML-KEM algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHAKE algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."},{"versions":["v23.5.0","v22.13.0","v20.19.3"],"prUrl":"https://github.com/nodejs/node/pull/56142","commit":null,"description":"Algorithms `Ed25519` and `X25519` are now stable."},{"versions":["v20.0.0","v18.17.0"],"prUrl":"https://github.com/nodejs/node/pull/46067","commit":null,"description":"Arguments are now coerced and validated as per their WebIDL definitions like in other Web Crypto API implementations."},{"versions":["v19.0.0"],"prUrl":"https://github.com/nodejs/node/pull/44897","commit":null,"description":"No longer experimental except for the `Ed25519`, `Ed448`, `X25519`, and `X448` algorithms."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/43310","commit":null,"description":"Removed proprietary `'node.keyObject'` import/export format."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/43310","commit":null,"description":"Removed proprietary `'NODE-DSA'`, `'NODE-DH'`, and `'NODE-SCRYPT'` algorithms."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'Ed25519'`, `'Ed448'`, `'X25519'`, and `'X448'` algorithms."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Removed proprietary `'NODE-ED25519'` and `'NODE-ED448'` algorithms."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Removed proprietary `'NODE-X25519'` and `'NODE-X448'` named curves from the `'ECDH'` algorithm."}],"description":"Node.js provides an implementation of the [Web Crypto API](https://www.w3.org/TR/WebCryptoAPI/) standard.\n\nUse `globalThis.crypto` or `require('node:crypto').webcrypto` to access this\nmodule.\n\n```js\nconst { subtle } = globalThis.crypto;\n\n(async function() {\n\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash: 'SHA-256',\n    length: 256,\n  }, true, ['sign', 'verify']);\n\n  const enc = new TextEncoder();\n  const message = enc.encode('I love cupcakes');\n\n  const digest = await subtle.sign({\n    name: 'HMAC',\n  }, key, message);\n\n})();\n```","summary":"Node.js provides an implementation of the Web Crypto API standard.","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\n(async function() {\n\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash: 'SHA-256',\n    length: 256,\n  }, true, ['sign', 'verify']);\n\n  const enc = new TextEncoder();\n  const message = enc.encode('I love cupcakes');\n\n  const digest = await subtle.sign({\n    name: 'HMAC',\n  }, key, message);\n\n})();"}],"children":[{"kind":"section","id":"modern-algorithms-in-the-web-cryptography-api","name":"Modern Algorithms in the Web Cryptography API","title":"Modern Algorithms in the Web Cryptography API","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Node.js provides an implementation of the following features from the\n[Modern Algorithms in the Web Cryptography API](https://wicg.github.io/webcrypto-modern-algos/)\nWICG proposal:\n\nAlgorithms:\n\n* `'AES-OCB'`[^openssl30]\n* `'Argon2d'`[^openssl32]\n* `'Argon2i'`[^openssl32]\n* `'Argon2id'`[^openssl32]\n* `'ChaCha20-Poly1305'`\n* `'cSHAKE128'`\n* `'cSHAKE256'`\n* `'KMAC128'`[^openssl30]\n* `'KMAC256'`[^openssl30]\n* `'KT128'`\n* `'KT256'`\n* `'ML-DSA-44'`[^openssl35]\n* `'ML-DSA-65'`[^openssl35]\n* `'ML-DSA-87'`[^openssl35]\n* `'ML-KEM-512'`[^openssl35]\n* `'ML-KEM-768'`[^openssl35]\n* `'ML-KEM-1024'`[^openssl35]\n* `'SHA3-256'`\n* `'SHA3-384'`\n* `'SHA3-512'`\n* `'TurboSHAKE128'`\n* `'TurboSHAKE256'`\n\nKey Formats:\n\n* `'raw-public'`\n* `'raw-secret'`\n* `'raw-seed'`\n\nMethods:\n\n* [`subtle.decapsulateBits()`](#subtledecapsulatebitsdecapsulationalgorithm-decapsulationkey-ciphertext)\n* [`subtle.decapsulateKey()`](#subtledecapsulatekeydecapsulationalgorithm-decapsulationkey-ciphertext-sharedkeyalgorithm-extractable-keyusages)\n* [`subtle.encapsulateBits()`](#subtleencapsulatebitsencapsulationalgorithm-encapsulationkey)\n* [`subtle.encapsulateKey()`](#subtleencapsulatekeyencapsulationalgorithm-encapsulationkey-sharedkeyalgorithm-extractable-keyusages)\n* [`subtle.getPublicKey()`](#subtlegetpublickeykey-keyusages)\n* [`SubtleCrypto.supports()`](#static-method-subtlecryptosupportsoperation-algorithm-lengthoradditionalalgorithm)","summary":"Node.js provides an implementation of the following features from the Modern Algorithms in the Web Cryptography API WICG proposal:","examples":[],"children":[]},{"kind":"section","id":"secure-curves-in-the-web-cryptography-api","name":"Secure Curves in the Web Cryptography API","title":"Secure Curves in the Web Cryptography API","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"Node.js provides an implementation of the following features from the\n[Secure Curves in the Web Cryptography API](https://wicg.github.io/webcrypto-secure-curves/)\nWICG proposal:\n\nAlgorithms:\n\n* `'Ed448'`\n* `'X448'`","summary":"Node.js provides an implementation of the following features from the Secure Curves in the Web Cryptography API WICG proposal:","examples":[],"children":[]},{"kind":"section","id":"examples","name":"Examples","title":"Examples","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"","summary":"","examples":[],"children":[{"kind":"section","id":"generating-keys","name":"Generating keys","title":"Generating keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The {SubtleCrypto} class can be used to generate symmetric (secret) keys\nor asymmetric key pairs (public key and private key).","summary":"The {SubtleCrypto} class can be used to generate symmetric (secret) keys or asymmetric key pairs (public key and private key).","examples":[],"children":[{"kind":"section","id":"aes-keys","name":"AES keys","title":"AES keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateAesKey(length = 256) {\n  const key = await subtle.generateKey({\n    name: 'AES-CBC',\n    length,\n  }, true, ['encrypt', 'decrypt']);\n\n  return key;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateAesKey(length = 256) {\n  const key = await subtle.generateKey({\n    name: 'AES-CBC',\n    length,\n  }, true, ['encrypt', 'decrypt']);\n\n  return key;\n}"}],"children":[]},{"kind":"section","id":"ecdsa-key-pairs","name":"ECDSA key pairs","title":"ECDSA key pairs","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateEcKey(namedCurve = 'P-521') {\n  const {\n    publicKey,\n    privateKey,\n  } = await subtle.generateKey({\n    name: 'ECDSA',\n    namedCurve,\n  }, true, ['sign', 'verify']);\n\n  return { publicKey, privateKey };\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateEcKey(namedCurve = 'P-521') {\n  const {\n    publicKey,\n    privateKey,\n  } = await subtle.generateKey({\n    name: 'ECDSA',\n    namedCurve,\n  }, true, ['sign', 'verify']);\n\n  return { publicKey, privateKey };\n}"}],"children":[]},{"kind":"section","id":"ed25519x25519-key-pairs","name":"Ed25519/X25519 key pairs","title":"Ed25519/X25519 key pairs","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateEd25519Key() {\n  return subtle.generateKey({\n    name: 'Ed25519',\n  }, true, ['sign', 'verify']);\n}\n\nasync function generateX25519Key() {\n  return subtle.generateKey({\n    name: 'X25519',\n  }, true, ['deriveKey']);\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateEd25519Key() {\n  return subtle.generateKey({\n    name: 'Ed25519',\n  }, true, ['sign', 'verify']);\n}\n\nasync function generateX25519Key() {\n  return subtle.generateKey({\n    name: 'X25519',\n  }, true, ['deriveKey']);\n}"}],"children":[]},{"kind":"section","id":"hmac-keys","name":"HMAC keys","title":"HMAC keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateHmacKey(hash = 'SHA-256') {\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return key;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateHmacKey(hash = 'SHA-256') {\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return key;\n}"}],"children":[]},{"kind":"section","id":"rsa-key-pairs","name":"RSA key pairs","title":"RSA key pairs","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\nconst publicExponent = new Uint8Array([1, 0, 1]);\n\nasync function generateRsaKey(modulusLength = 2048, hash = 'SHA-256') {\n  const {\n    publicKey,\n    privateKey,\n  } = await subtle.generateKey({\n    name: 'RSASSA-PKCS1-v1_5',\n    modulusLength,\n    publicExponent,\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return { publicKey, privateKey };\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\nconst publicExponent = new Uint8Array([1, 0, 1]);\n\nasync function generateRsaKey(modulusLength = 2048, hash = 'SHA-256') {\n  const {\n    publicKey,\n    privateKey,\n  } = await subtle.generateKey({\n    name: 'RSASSA-PKCS1-v1_5',\n    modulusLength,\n    publicExponent,\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return { publicKey, privateKey };\n}"}],"children":[]}]},{"kind":"section","id":"encryption-and-decryption","name":"Encryption and decryption","title":"Encryption and decryption","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst crypto = globalThis.crypto;\n\nasync function aesEncrypt(plaintext) {\n  const ec = new TextEncoder();\n  const key = await generateAesKey();\n  const iv = crypto.getRandomValues(new Uint8Array(16));\n\n  const ciphertext = await crypto.subtle.encrypt({\n    name: 'AES-CBC',\n    iv,\n  }, key, ec.encode(plaintext));\n\n  return {\n    key,\n    iv,\n    ciphertext,\n  };\n}\n\nasync function aesDecrypt(ciphertext, key, iv) {\n  const dec = new TextDecoder();\n  const plaintext = await crypto.subtle.decrypt({\n    name: 'AES-CBC',\n    iv,\n  }, key, ciphertext);\n\n  return dec.decode(plaintext);\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const crypto = globalThis.crypto;\n\nasync function aesEncrypt(plaintext) {\n  const ec = new TextEncoder();\n  const key = await generateAesKey();\n  const iv = crypto.getRandomValues(new Uint8Array(16));\n\n  const ciphertext = await crypto.subtle.encrypt({\n    name: 'AES-CBC',\n    iv,\n  }, key, ec.encode(plaintext));\n\n  return {\n    key,\n    iv,\n    ciphertext,\n  };\n}\n\nasync function aesDecrypt(ciphertext, key, iv) {\n  const dec = new TextDecoder();\n  const plaintext = await crypto.subtle.decrypt({\n    name: 'AES-CBC',\n    iv,\n  }, key, ciphertext);\n\n  return dec.decode(plaintext);\n}"}],"children":[]},{"kind":"section","id":"exporting-and-importing-keys","name":"Exporting and importing keys","title":"Exporting and importing keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateAndExportHmacKey(format = 'jwk', hash = 'SHA-512') {\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return subtle.exportKey(format, key);\n}\n\nasync function importHmacKey(keyData, format = 'jwk', hash = 'SHA-512') {\n  const key = await subtle.importKey(format, keyData, {\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return key;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateAndExportHmacKey(format = 'jwk', hash = 'SHA-512') {\n  const key = await subtle.generateKey({\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return subtle.exportKey(format, key);\n}\n\nasync function importHmacKey(keyData, format = 'jwk', hash = 'SHA-512') {\n  const key = await subtle.importKey(format, keyData, {\n    name: 'HMAC',\n    hash,\n  }, true, ['sign', 'verify']);\n\n  return key;\n}"}],"children":[]},{"kind":"section","id":"wrapping-and-unwrapping-keys","name":"Wrapping and unwrapping keys","title":"Wrapping and unwrapping keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function generateAndWrapHmacKey(format = 'jwk', hash = 'SHA-512') {\n  const [\n    key,\n    wrappingKey,\n  ] = await Promise.all([\n    subtle.generateKey({\n      name: 'HMAC', hash,\n    }, true, ['sign', 'verify']),\n    subtle.generateKey({\n      name: 'AES-KW',\n      length: 256,\n    }, true, ['wrapKey', 'unwrapKey']),\n  ]);\n\n  const wrappedKey = await subtle.wrapKey(format, key, wrappingKey, 'AES-KW');\n\n  return { wrappedKey, wrappingKey };\n}\n\nasync function unwrapHmacKey(\n  wrappedKey,\n  wrappingKey,\n  format = 'jwk',\n  hash = 'SHA-512') {\n\n  const key = await subtle.unwrapKey(\n    format,\n    wrappedKey,\n    wrappingKey,\n    'AES-KW',\n    { name: 'HMAC', hash },\n    true,\n    ['sign', 'verify']);\n\n  return key;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function generateAndWrapHmacKey(format = 'jwk', hash = 'SHA-512') {\n  const [\n    key,\n    wrappingKey,\n  ] = await Promise.all([\n    subtle.generateKey({\n      name: 'HMAC', hash,\n    }, true, ['sign', 'verify']),\n    subtle.generateKey({\n      name: 'AES-KW',\n      length: 256,\n    }, true, ['wrapKey', 'unwrapKey']),\n  ]);\n\n  const wrappedKey = await subtle.wrapKey(format, key, wrappingKey, 'AES-KW');\n\n  return { wrappedKey, wrappingKey };\n}\n\nasync function unwrapHmacKey(\n  wrappedKey,\n  wrappingKey,\n  format = 'jwk',\n  hash = 'SHA-512') {\n\n  const key = await subtle.unwrapKey(\n    format,\n    wrappedKey,\n    wrappingKey,\n    'AES-KW',\n    { name: 'HMAC', hash },\n    true,\n    ['sign', 'verify']);\n\n  return key;\n}"}],"children":[]},{"kind":"section","id":"sign-and-verify","name":"Sign and verify","title":"Sign and verify","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function sign(key, data) {\n  const ec = new TextEncoder();\n  const signature =\n    await subtle.sign('RSASSA-PKCS1-v1_5', key, ec.encode(data));\n  return signature;\n}\n\nasync function verify(key, signature, data) {\n  const ec = new TextEncoder();\n  const verified =\n    await subtle.verify(\n      'RSASSA-PKCS1-v1_5',\n      key,\n      signature,\n      ec.encode(data));\n  return verified;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function sign(key, data) {\n  const ec = new TextEncoder();\n  const signature =\n    await subtle.sign('RSASSA-PKCS1-v1_5', key, ec.encode(data));\n  return signature;\n}\n\nasync function verify(key, signature, data) {\n  const ec = new TextEncoder();\n  const verified =\n    await subtle.verify(\n      'RSASSA-PKCS1-v1_5',\n      key,\n      signature,\n      ec.encode(data));\n  return verified;\n}"}],"children":[]},{"kind":"section","id":"deriving-bits-and-keys","name":"Deriving bits and keys","title":"Deriving bits and keys","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function pbkdf2(pass, salt, iterations = 1000, length = 256) {\n  const ec = new TextEncoder();\n  const key = await subtle.importKey(\n    'raw',\n    ec.encode(pass),\n    'PBKDF2',\n    false,\n    ['deriveBits']);\n  const bits = await subtle.deriveBits({\n    name: 'PBKDF2',\n    hash: 'SHA-512',\n    salt: ec.encode(salt),\n    iterations,\n  }, key, length);\n  return bits;\n}\n\nasync function pbkdf2Key(pass, salt, iterations = 1000, length = 256) {\n  const ec = new TextEncoder();\n  const keyMaterial = await subtle.importKey(\n    'raw',\n    ec.encode(pass),\n    'PBKDF2',\n    false,\n    ['deriveKey']);\n  const key = await subtle.deriveKey({\n    name: 'PBKDF2',\n    hash: 'SHA-512',\n    salt: ec.encode(salt),\n    iterations,\n  }, keyMaterial, {\n    name: 'AES-GCM',\n    length,\n  }, true, ['encrypt', 'decrypt']);\n  return key;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function pbkdf2(pass, salt, iterations = 1000, length = 256) {\n  const ec = new TextEncoder();\n  const key = await subtle.importKey(\n    'raw',\n    ec.encode(pass),\n    'PBKDF2',\n    false,\n    ['deriveBits']);\n  const bits = await subtle.deriveBits({\n    name: 'PBKDF2',\n    hash: 'SHA-512',\n    salt: ec.encode(salt),\n    iterations,\n  }, key, length);\n  return bits;\n}\n\nasync function pbkdf2Key(pass, salt, iterations = 1000, length = 256) {\n  const ec = new TextEncoder();\n  const keyMaterial = await subtle.importKey(\n    'raw',\n    ec.encode(pass),\n    'PBKDF2',\n    false,\n    ['deriveKey']);\n  const key = await subtle.deriveKey({\n    name: 'PBKDF2',\n    hash: 'SHA-512',\n    salt: ec.encode(salt),\n    iterations,\n  }, keyMaterial, {\n    name: 'AES-GCM',\n    length,\n  }, true, ['encrypt', 'decrypt']);\n  return key;\n}"}],"children":[]},{"kind":"section","id":"digest","name":"Digest","title":"Digest","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```js\nconst { subtle } = globalThis.crypto;\n\nasync function digest(data, algorithm = 'SHA-512') {\n  const ec = new TextEncoder();\n  const digest = await subtle.digest(algorithm, ec.encode(data));\n  return digest;\n}\n```","summary":"","examples":[{"language":"js","displayName":null,"code":"const { subtle } = globalThis.crypto;\n\nasync function digest(data, algorithm = 'SHA-512') {\n  const ec = new TextEncoder();\n  const digest = await subtle.digest(algorithm, ec.encode(data));\n  return digest;\n}"}],"children":[]},{"kind":"section","id":"checking-for-runtime-algorithm-support","name":"Checking for runtime algorithm support","title":"Checking for runtime algorithm support","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"[`SubtleCrypto.supports()`](#static-method-subtlecryptosupportsoperation-algorithm-lengthoradditionalalgorithm) allows feature detection in Web Crypto API,\nwhich can be used to detect whether a given algorithm identifier\n(including its parameters) is supported for the given operation.\n\nThis example derives a key from a password using Argon2, if available,\nor PBKDF2, otherwise; and then encrypts and decrypts some text with it\nusing AES-OCB, if available, and AES-GCM, otherwise.\n\n```mjs\nconst { SubtleCrypto, crypto } = globalThis;\n\nconst password = 'correct horse battery staple';\nconst derivationAlg =\n  SubtleCrypto.supports?.('importKey', 'Argon2id') ?\n    'Argon2id' :\n    'PBKDF2';\nconst encryptionAlg =\n  SubtleCrypto.supports?.('importKey', 'AES-OCB') ?\n    'AES-OCB' :\n    'AES-GCM';\nconst passwordKey = await crypto.subtle.importKey(\n  derivationAlg === 'Argon2id' ? 'raw-secret' : 'raw',\n  new TextEncoder().encode(password),\n  derivationAlg,\n  false,\n  ['deriveKey'],\n);\nconst nonce = crypto.getRandomValues(new Uint8Array(16));\nconst derivationParams =\n  derivationAlg === 'Argon2id' ?\n    {\n      nonce,\n      parallelism: 4,\n      memory: 2 ** 21,\n      passes: 1,\n    } :\n    {\n      salt: nonce,\n      iterations: 100_000,\n      hash: 'SHA-256',\n    };\nconst key = await crypto.subtle.deriveKey(\n  {\n    name: derivationAlg,\n    ...derivationParams,\n  },\n  passwordKey,\n  {\n    name: encryptionAlg,\n    length: 256,\n  },\n  false,\n  ['encrypt', 'decrypt'],\n);\nconst plaintext = 'Hello, world!';\nconst iv = crypto.getRandomValues(new Uint8Array(12));\nconst encrypted = await crypto.subtle.encrypt(\n  { name: encryptionAlg, iv },\n  key,\n  new TextEncoder().encode(plaintext),\n);\nconst decrypted = new TextDecoder().decode(await crypto.subtle.decrypt(\n  { name: encryptionAlg, iv },\n  key,\n  encrypted,\n));\n```","summary":"`SubtleCrypto.supports()` allows feature detection in Web Crypto API, which can be used to detect whether a given algorithm identifier (including its parameters) is supported for the given operation.","examples":[{"language":"mjs","displayName":null,"code":"const { SubtleCrypto, crypto } = globalThis;\n\nconst password = 'correct horse battery staple';\nconst derivationAlg =\n  SubtleCrypto.supports?.('importKey', 'Argon2id') ?\n    'Argon2id' :\n    'PBKDF2';\nconst encryptionAlg =\n  SubtleCrypto.supports?.('importKey', 'AES-OCB') ?\n    'AES-OCB' :\n    'AES-GCM';\nconst passwordKey = await crypto.subtle.importKey(\n  derivationAlg === 'Argon2id' ? 'raw-secret' : 'raw',\n  new TextEncoder().encode(password),\n  derivationAlg,\n  false,\n  ['deriveKey'],\n);\nconst nonce = crypto.getRandomValues(new Uint8Array(16));\nconst derivationParams =\n  derivationAlg === 'Argon2id' ?\n    {\n      nonce,\n      parallelism: 4,\n      memory: 2 ** 21,\n      passes: 1,\n    } :\n    {\n      salt: nonce,\n      iterations: 100_000,\n      hash: 'SHA-256',\n    };\nconst key = await crypto.subtle.deriveKey(\n  {\n    name: derivationAlg,\n    ...derivationParams,\n  },\n  passwordKey,\n  {\n    name: encryptionAlg,\n    length: 256,\n  },\n  false,\n  ['encrypt', 'decrypt'],\n);\nconst plaintext = 'Hello, world!';\nconst iv = crypto.getRandomValues(new Uint8Array(12));\nconst encrypted = await crypto.subtle.encrypt(\n  { name: encryptionAlg, iv },\n  key,\n  new TextEncoder().encode(plaintext),\n);\nconst decrypted = new TextDecoder().decode(await crypto.subtle.decrypt(\n  { name: encryptionAlg, iv },\n  key,\n  encrypted,\n));"}],"children":[]}]},{"kind":"section","id":"algorithm-support","name":"Algorithm support","title":"Algorithm support","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following sections detail the algorithms supported by the Node.js Web\nCrypto API implementation and the APIs supported for each:","summary":"The following sections detail the algorithms supported by the Node.js Web Crypto API implementation and the APIs supported for each:","examples":[],"children":[{"kind":"section","id":"key-management-apis","name":"Key Management APIs","title":"Key Management APIs","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"* [`subtle.generateKey()`](#subtlegeneratekeyalgorithm-extractable-keyusages), [`subtle.exportKey()`](#subtleexportkeyformat-key), and\n  [`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages) support `'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`,\n  `'AES-KW'`, `'AES-OCB'`, `'ChaCha20-Poly1305'`[^modern-algos], `'HMAC'`,\n  `'KMAC128'`[^modern-algos], and `'KMAC256'`[^modern-algos].\n* [`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages) supports `'Argon2d'`, `'Argon2i'`, `'Argon2id'`,\n  `'HKDF'`, and `'PBKDF2'`.\n* [`subtle.generateKey()`](#subtlegeneratekeyalgorithm-extractable-keyusages), [`subtle.exportKey()`](#subtleexportkeyformat-key),\n  [`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages), and [`subtle.getPublicKey()`](#subtlegetpublickeykey-keyusages) support `'ECDH'`,\n  `'ECDSA'`, `'Ed25519'`, `'Ed448'`[^secure-curves],\n  `'ML-DSA-44'`[^modern-algos], `'ML-DSA-65'`[^modern-algos],\n  `'ML-DSA-87'`[^modern-algos], `'ML-KEM-512'`[^modern-algos],\n  `'ML-KEM-768'`[^modern-algos], `'ML-KEM-1024'`[^modern-algos], `'RSA-OAEP'`,\n  `'RSA-PSS'`, `'RSASSA-PKCS1-v1_5'`, `'X25519'`, and\n  `'X448'`[^secure-curves].","summary":"","examples":[],"children":[]},{"kind":"section","id":"crypto-operation-apis","name":"Crypto Operation APIs","title":"Crypto Operation APIs","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"* [`subtle.encrypt()`](#subtleencryptalgorithm-key-data) and [`subtle.decrypt()`](#subtledecryptalgorithm-key-data) support `'AES-CBC'`,\n  `'AES-CTR'`, `'AES-GCM'`, `'AES-OCB'`,\n  `'ChaCha20-Poly1305'`[^modern-algos], and `'RSA-OAEP'`.\n* [`subtle.sign()`](#subtlesignalgorithm-key-data) and [`subtle.verify()`](#subtleverifyalgorithm-key-signature-data) support `'ECDSA'`, `'Ed25519'`,\n  `'Ed448'`[^secure-curves], `'HMAC'`, `'KMAC128'`[^modern-algos],\n  `'KMAC256'`[^modern-algos], `'ML-DSA-44'`[^modern-algos],\n  `'ML-DSA-65'`[^modern-algos], `'ML-DSA-87'`[^modern-algos], `'RSA-PSS'`, and\n  `'RSASSA-PKCS1-v1_5'`.\n* [`subtle.deriveBits()`](#subtlederivebitsalgorithm-basekey-length) and [`subtle.deriveKey()`](#subtlederivekeyalgorithm-basekey-derivedkeytype-extractable-keyusages) support `'Argon2d'`,\n  `'Argon2i'`, `'Argon2id'`, `'ECDH'`, `'HKDF'`, `'PBKDF2'`, `'X25519'`, and\n  `'X448'`[^secure-curves].\n* [`subtle.wrapKey()`](#subtlewrapkeyformat-key-wrappingkey-wrapalgorithm) and [`subtle.unwrapKey()`](#subtleunwrapkeyformat-wrappedkey-unwrappingkey-unwrapalgorithm-unwrappedkeyalgorithm-extractable-keyusages) support `'AES-CBC'`,\n  `'AES-CTR'`, `'AES-GCM'`, `'AES-KW'`, `'AES-OCB'`,\n  `'ChaCha20-Poly1305'`[^modern-algos], and `'RSA-OAEP'`.\n* [`subtle.encapsulateBits()`](#subtleencapsulatebitsencapsulationalgorithm-encapsulationkey), [`subtle.decapsulateBits()`](#subtledecapsulatebitsdecapsulationalgorithm-decapsulationkey-ciphertext),\n  [`subtle.encapsulateKey()`](#subtleencapsulatekeyencapsulationalgorithm-encapsulationkey-sharedkeyalgorithm-extractable-keyusages), and [`subtle.decapsulateKey()`](#subtledecapsulatekeydecapsulationalgorithm-decapsulationkey-ciphertext-sharedkeyalgorithm-extractable-keyusages) support\n  `'ML-KEM-512'`[^modern-algos], `'ML-KEM-768'`[^modern-algos], and\n  `'ML-KEM-1024'`[^modern-algos].\n* [`subtle.digest()`](#subtledigestalgorithm-data) supports `'cSHAKE128'`[^modern-algos],\n  `'cSHAKE256'`[^modern-algos], `'KT128'`[^modern-algos],\n  `'KT256'`[^modern-algos], `'SHA-1'`, `'SHA-256'`, `'SHA-384'`, `'SHA-512'`,\n  `'SHA3-256'`[^modern-algos], `'SHA3-384'`[^modern-algos],\n  `'SHA3-512'`[^modern-algos], `'TurboSHAKE128'`[^modern-algos], and\n  `'TurboSHAKE256'`[^modern-algos].","summary":"","examples":[],"children":[]},{"kind":"section","id":"key-formats","name":"Key Formats","title":"Key Formats","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following list describes the formats supported by [`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages)\nand [`subtle.exportKey()`](#subtleexportkeyformat-key).\n\n* **`'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`, `'AES-KW'`, and `'HMAC'`** can\n  be imported and exported using `'jwk'`, `'raw'`, and\n  `'raw-secret'`[^modern-algos].\n* **`'AES-OCB'`[^modern-algos], `'ChaCha20-Poly1305'`[^modern-algos],\n  `'KMAC128'`[^modern-algos], and `'KMAC256'`[^modern-algos]** can be imported\n  and exported using `'jwk'` and `'raw-secret'`[^modern-algos].\n* **`'Argon2d'`[^modern-algos], `'Argon2i'`[^modern-algos], and\n  `'Argon2id'`[^modern-algos]** can be imported using\n  `'raw-secret'`[^modern-algos]; export is not supported.\n* **`'ECDH'`, `'ECDSA'`, `'Ed25519'`, `'Ed448'`[^secure-curves], `'X25519'`,\n  and `'X448'`[^secure-curves]** can be imported and exported using `'spki'`,\n  `'pkcs8'`, `'jwk'`, `'raw'`, and `'raw-public'`[^modern-algos].\n* **`'HKDF'` and `'PBKDF2'`** can be imported using `'raw'` and\n  `'raw-secret'`[^modern-algos]; export is not supported.\n* **`'ML-DSA-44'`[^modern-algos], `'ML-DSA-65'`[^modern-algos],\n  `'ML-DSA-87'`[^modern-algos], `'ML-KEM-512'`[^modern-algos],\n  `'ML-KEM-768'`[^modern-algos], and `'ML-KEM-1024'`[^modern-algos]** can be\n  imported and exported using `'spki'`, `'pkcs8'`, `'jwk'`,\n  `'raw-public'`[^modern-algos], and `'raw-seed'`[^modern-algos].\n* **`'RSA-OAEP'`, `'RSA-PSS'`, and `'RSASSA-PKCS1-v1_5'`** can be imported\n  and exported using `'spki'`, `'pkcs8'`, and `'jwk'`.","summary":"The following list describes the formats supported by `subtle.importKey()` and `subtle.exportKey()`.","examples":[],"children":[]}]},{"kind":"class","id":"class-crypto","name":"Crypto","title":"Class: `Crypto`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"`globalThis.crypto` is an instance of the `Crypto`\nclass. `Crypto` is a singleton that provides access to the remainder of the\ncrypto API.","summary":"`globalThis.crypto` is an instance of the `Crypto` class. `Crypto` is a singleton that provides access to the remainder of the crypto API.","examples":[],"children":[{"kind":"property","id":"cryptosubtle","name":"subtle","title":"`crypto.subtle`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"SubtleCrypto","links":[{"name":"SubtleCrypto","href":"webcrypto.html#class-subtlecrypto","start":0,"end":12}]},"default":null,"description":"Provides access to the `SubtleCrypto` API.","summary":"Provides access to the `SubtleCrypto` API.","examples":[],"children":[]},{"kind":"method","id":"cryptogetrandomvaluestypedarray","name":"getRandomValues","title":"`crypto.getRandomValues(typedArray)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"typedArray","type":{"text":"Buffer | TypedArray","links":[{"name":"Buffer","href":"buffer.html#class-buffer","start":0,"end":6},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":9,"end":19}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Buffer | TypedArray","links":[{"name":"Buffer","href":"buffer.html#class-buffer","start":0,"end":6},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":9,"end":19}]},"description":""}},"description":"Generates cryptographically strong random values. The given `typedArray` is\nfilled with random values, and a reference to `typedArray` is returned.\n\nThe given `typedArray` must be an integer-based instance of {TypedArray},\ni.e. `Float32Array` and `Float64Array` are not accepted.\n\nAn error will be thrown if the given `typedArray` is larger than 65,536 bytes.","summary":"Generates cryptographically strong random values. The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.","examples":[],"children":[]},{"kind":"method","id":"cryptorandomuuid","name":"randomUUID","title":"`crypto.randomUUID()`","scope":"module","overloadOf":null,"stability":null,"added":["v16.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a\ncryptographic pseudorandom number generator.","summary":"Generates a random RFC 4122 version 4 UUID. The UUID is generated using a cryptographic pseudorandom number generator.","examples":[],"children":[]}]},{"kind":"class","id":"class-cryptokey","name":"CryptoKey","title":"Class: `CryptoKey`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"cryptokeyalgorithm","name":"algorithm","title":"`cryptoKey.algorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"KeyAlgorithm | RsaHashedKeyAlgorithm | EcKeyAlgorithm | AesKeyAlgorithm | HmacKeyAlgorithm | KmacKeyAlgorithm","links":[{"name":"KeyAlgorithm","href":"webcrypto.html#class-keyalgorithm","start":0,"end":12},{"name":"RsaHashedKeyAlgorithm","href":"webcrypto.html#class-rsahashedkeyalgorithm","start":15,"end":36},{"name":"EcKeyAlgorithm","href":"webcrypto.html#class-eckeyalgorithm","start":39,"end":53},{"name":"AesKeyAlgorithm","href":"webcrypto.html#class-aeskeyalgorithm","start":56,"end":71},{"name":"HmacKeyAlgorithm","href":"webcrypto.html#class-hmackeyalgorithm","start":74,"end":90},{"name":"KmacKeyAlgorithm","href":"webcrypto.html#class-kmackeyalgorithm","start":93,"end":109}]},"default":null,"description":"An object detailing the algorithm for which the key can be used along with\nadditional algorithm-specific parameters.\n\nRead-only.","summary":"An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.","examples":[],"children":[]},{"kind":"property","id":"cryptokeyextractable","name":"extractable","title":"`cryptoKey.extractable`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"boolean","links":[{"name":"boolean","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type","start":0,"end":7}]},"default":null,"description":"When `true`, the {CryptoKey} can be extracted using either\n[`subtle.exportKey()`](#subtleexportkeyformat-key) or [`subtle.wrapKey()`](#subtlewrapkeyformat-key-wrappingkey-wrapalgorithm).\n\nRead-only.","summary":"When `true`, the {CryptoKey} can be extracted using either `subtle.exportKey()` or `subtle.wrapKey()`.","examples":[],"children":[]},{"kind":"property","id":"cryptokeytype","name":"type","title":"`cryptoKey.type`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"One of `'secret'`, `'private'`, or `'public'`.\n\nA string identifying whether the key is a symmetric (`'secret'`) or\nasymmetric (`'private'` or `'public'`) key.","summary":"A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.","examples":[],"children":[]},{"kind":"property","id":"cryptokeyusages","name":"usages","title":"`cryptoKey.usages`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string[]","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"An array of strings identifying the operations for which the\nkey may be used.\n\nThe possible usages are:\n\n* `'encrypt'` - Enable using the key with [`subtle.encrypt()`](#subtleencryptalgorithm-key-data)\n* `'decrypt'` - Enable using the key with [`subtle.decrypt()`](#subtledecryptalgorithm-key-data)\n* `'sign'` - Enable using the key with [`subtle.sign()`](#subtlesignalgorithm-key-data)\n* `'verify'` - Enable using the key with [`subtle.verify()`](#subtleverifyalgorithm-key-signature-data)\n* `'deriveKey'` - Enable using the key with [`subtle.deriveKey()`](#subtlederivekeyalgorithm-basekey-derivedkeytype-extractable-keyusages)\n* `'deriveBits'` - Enable using the key with [`subtle.deriveBits()`](#subtlederivebitsalgorithm-basekey-length)\n* `'encapsulateBits'` - Enable using the key with [`subtle.encapsulateBits()`](#subtleencapsulatebitsencapsulationalgorithm-encapsulationkey)\n* `'decapsulateBits'` - Enable using the key with [`subtle.decapsulateBits()`](#subtledecapsulatebitsdecapsulationalgorithm-decapsulationkey-ciphertext)\n* `'encapsulateKey'` - Enable using the key with [`subtle.encapsulateKey()`](#subtleencapsulatekeyencapsulationalgorithm-encapsulationkey-sharedkeyalgorithm-extractable-keyusages)\n* `'decapsulateKey'` - Enable using the key with [`subtle.decapsulateKey()`](#subtledecapsulatekeydecapsulationalgorithm-decapsulationkey-ciphertext-sharedkeyalgorithm-extractable-keyusages)\n* `'wrapKey'` - Enable using the key with [`subtle.wrapKey()`](#subtlewrapkeyformat-key-wrappingkey-wrapalgorithm)\n* `'unwrapKey'` - Enable using the key with [`subtle.unwrapKey()`](#subtleunwrapkeyformat-wrappedkey-unwrappingkey-unwrapalgorithm-unwrappedkeyalgorithm-extractable-keyusages)\n\nValid key usages depend on the key algorithm (identified by\n`cryptokey.algorithm.name`). See [Crypto operation APIs](#crypto-operation-apis) for the operations\nsupported by each key algorithm.","summary":"An array of strings identifying the operations for which the key may be used.","examples":[],"children":[]}]},{"kind":"class","id":"class-cryptokeypair","name":"CryptoKeyPair","title":"Class: `CryptoKeyPair`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"The `CryptoKeyPair` is a simple dictionary object with `publicKey` and\n`privateKey` properties, representing an asymmetric key pair.","summary":"The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.","examples":[],"children":[{"kind":"property","id":"cryptokeypairprivatekey","name":"privateKey","title":"`cryptoKeyPair.privateKey`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"default":null,"description":"A {CryptoKey} whose `type` will be `'private'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"cryptokeypairpublickey","name":"publicKey","title":"`cryptoKeyPair.publicKey`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"default":null,"description":"A {CryptoKey} whose `type` will be `'public'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-subtlecrypto","name":"SubtleCrypto","title":"Class: `SubtleCrypto`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"staticMethod","id":"static-method-subtlecryptosupportsoperation-algorithm-lengthoradditionalalgorithm","name":"supports","title":"Static method: `SubtleCrypto.supports(operation, algorithm[, lengthOrAdditionalAlgorithm])`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"operation","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"\"encrypt\", \"decrypt\", \"sign\", \"verify\", \"digest\", \"generateKey\", \"deriveKey\", \"deriveBits\", \"importKey\", \"exportKey\", \"getPublicKey\", \"wrapKey\", \"unwrapKey\", \"encapsulateBits\", \"encapsulateKey\", \"decapsulateBits\", or \"decapsulateKey\"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"algorithm","type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"lengthOrAdditionalAlgorithm","type":{"text":"null | number | string | Algorithm | undefined","links":[{"name":"null","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#null_type","start":0,"end":4},{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":7,"end":13},{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":16,"end":22},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":25,"end":34},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":37,"end":46}]},"description":"Depending on the operation this is either ignored, the value of the length argument when operation is \"deriveBits\", the algorithm of key to be derived when operation is \"deriveKey\", the algorithm of key to be exported before wrapping when operation is \"wrapKey\", the algorithm of key to be imported after unwrapping when operation is \"unwrapKey\", or the algorithm of key to be imported after en/decapsulating a key when operation is \"encapsulateKey\" or \"decapsulateKey\".","default":"`null` when operation is \"deriveBits\", `undefined` otherwise","optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"boolean","links":[{"name":"boolean","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type","start":0,"end":7}]},"description":"Indicating whether the implementation supports the given operation"}},"description":"Allows feature detection in Web Crypto API,\nwhich can be used to detect whether a given algorithm identifier\n(including its parameters) is supported for the given operation.\n\nSee [Checking for runtime algorithm support](#checking-for-runtime-algorithm-support) for an example use of this method.","summary":"Allows feature detection in Web Crypto API, which can be used to detect whether a given algorithm identifier (including its parameters) is supported for the given operation.","examples":[],"children":[]},{"kind":"method","id":"subtledecapsulatebitsdecapsulationalgorithm-decapsulationkey-ciphertext","name":"decapsulateBits","title":"`subtle.decapsulateBits(decapsulationAlgorithm, decapsulationKey, ciphertext)`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"decapsulationAlgorithm","type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"decapsulationKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"ciphertext","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with {ArrayBuffer} upon success."}},"description":"A message recipient uses their asymmetric private key to decrypt an\n\"encapsulated key\" (ciphertext), thereby recovering a temporary symmetric\nkey (represented as {ArrayBuffer}) which is then used to decrypt a message.\n\nThe algorithms currently supported include:\n\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]","summary":"A message recipient uses their asymmetric private key to decrypt an \"encapsulated key\" (ciphertext), thereby recovering a temporary symmetric key (represented as {ArrayBuffer}) which is then used to decrypt a message.","examples":[],"children":[]},{"kind":"method","id":"subtledecapsulatekeydecapsulationalgorithm-decapsulationkey-ciphertext-sharedkeyalgorithm-extractable-keyusages","name":"decapsulateKey","title":"`subtle.decapsulateKey(decapsulationAlgorithm, decapsulationKey, ciphertext, sharedKeyAlgorithm, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"decapsulationAlgorithm","type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"decapsulationKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"ciphertext","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"sharedKeyAlgorithm","type":{"text":"string | Algorithm | HmacImportParams | AesDerivedKeyParams | KmacImportParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"HmacImportParams","href":"webcrypto.html#class-hmacimportparams","start":21,"end":37},{"name":"AesDerivedKeyParams","href":"webcrypto.html#class-aesderivedkeyparams","start":40,"end":59},{"name":"KmacImportParams","href":"webcrypto.html#class-kmacimportparams","start":62,"end":78}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":{"text":"boolean","links":[{"name":"boolean","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type","start":0,"end":7}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":{"text":"string[]","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"See [Key usages](#cryptokeyusages).","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with {CryptoKey} upon success."}},"description":"A message recipient uses their asymmetric private key to decrypt an\n\"encapsulated key\" (ciphertext), thereby recovering a temporary symmetric\nkey (represented as {CryptoKey}) which is then used to decrypt a message.\n\nThe algorithms currently supported include:\n\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]","summary":"A message recipient uses their asymmetric private key to decrypt an \"encapsulated key\" (ciphertext), thereby recovering a temporary symmetric key (represented as {CryptoKey}) which is then used to decrypt a message.","examples":[],"children":[]},{"kind":"method","id":"subtledecryptalgorithm-key-data","name":"decrypt","title":"`subtle.decrypt(algorithm, key, data)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59539","commit":null,"description":"AES-OCB algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams","links":[{"name":"RsaOaepParams","href":"webcrypto.html#class-rsaoaepparams","start":0,"end":13},{"name":"AesCtrParams","href":"webcrypto.html#class-aesctrparams","start":16,"end":28},{"name":"AesCbcParams","href":"webcrypto.html#class-aescbcparams","start":31,"end":43},{"name":"AeadParams","href":"webcrypto.html#class-aeadparams","start":46,"end":56}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"data","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"Using the method and parameters specified in `algorithm` and the keying\nmaterial provided by `key`, this method attempts to decipher the\nprovided `data`. If successful, the returned promise will be resolved with\nan {ArrayBuffer} containing the plaintext result.\n\nThe algorithms currently supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'RSA-OAEP'`","summary":"Using the method and parameters specified in `algorithm` and the keying material provided by `key`, this method attempts to decipher the provided `data`. If successful, the returned promise will be resolved with an {ArrayBuffer} containing the plaintext result.","examples":[],"children":[]},{"kind":"method","id":"subtlederivebitsalgorithm-basekey-length","name":"deriveBits","title":"`subtle.deriveBits(algorithm, baseKey[, length])`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59544","commit":null,"description":"Argon2 algorithms are now supported."},{"versions":["v22.5.0","v20.17.0","v18.20.5"],"prUrl":"https://github.com/nodejs/node/pull/53601","commit":null,"description":"The length parameter is now optional for `'ECDH'`, `'X25519'`, and `'X448'`."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'X25519'`, and `'X448'` algorithms."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params","links":[{"name":"EcdhKeyDeriveParams","href":"webcrypto.html#class-ecdhkeyderiveparams","start":0,"end":19},{"name":"HkdfParams","href":"webcrypto.html#class-hkdfparams","start":22,"end":32},{"name":"Pbkdf2Params","href":"webcrypto.html#class-pbkdf2params","start":35,"end":47},{"name":"Argon2Params","href":"webcrypto.html#class-argon2params","start":50,"end":62}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"baseKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"length","type":{"text":"number | null","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6},{"name":"null","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#null_type","start":9,"end":13}]},"description":"","default":"null","optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"Using the method and parameters specified in `algorithm` and the keying\nmaterial provided by `baseKey`, this method attempts to generate\n`length` bits.\n\nWhen `length` is not provided or `null` the maximum number of bits for a given\nalgorithm is generated. This is allowed for the `'ECDH'`, `'X25519'`, and `'X448'`[^secure-curves]\nalgorithms, for other algorithms `length` is required to be a number.\n\nIf successful, the returned promise will be resolved with an {ArrayBuffer}\ncontaining the generated data.\n\nThe algorithms currently supported include:\n\n* `'Argon2d'`[^modern-algos]\n* `'Argon2i'`[^modern-algos]\n* `'Argon2id'`[^modern-algos]\n* `'ECDH'`\n* `'HKDF'`\n* `'PBKDF2'`\n* `'X25519'`\n* `'X448'`[^secure-curves]","summary":"Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, this method attempts to generate `length` bits.","examples":[],"children":[]},{"kind":"method","id":"subtlederivekeyalgorithm-basekey-derivedkeytype-extractable-keyusages","name":"deriveKey","title":"`subtle.deriveKey(algorithm, baseKey, derivedKeyType, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59544","commit":null,"description":"Argon2 algorithms are now supported."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'X25519'`, and `'X448'` algorithms."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params","links":[{"name":"EcdhKeyDeriveParams","href":"webcrypto.html#class-ecdhkeyderiveparams","start":0,"end":19},{"name":"HkdfParams","href":"webcrypto.html#class-hkdfparams","start":22,"end":32},{"name":"Pbkdf2Params","href":"webcrypto.html#class-pbkdf2params","start":35,"end":47},{"name":"Argon2Params","href":"webcrypto.html#class-argon2params","start":50,"end":62}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"baseKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"derivedKeyType","type":{"text":"string | Algorithm | HmacImportParams | AesDerivedKeyParams | KmacImportParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"HmacImportParams","href":"webcrypto.html#class-hmacimportparams","start":21,"end":37},{"name":"AesDerivedKeyParams","href":"webcrypto.html#class-aesderivedkeyparams","start":40,"end":59},{"name":"KmacImportParams","href":"webcrypto.html#class-kmacimportparams","start":62,"end":78}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":{"text":"boolean","links":[{"name":"boolean","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type","start":0,"end":7}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":{"text":"string[]","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"See [Key usages](#cryptokeyusages).","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with a {CryptoKey} upon success."}},"description":"Using the method and parameters specified in `algorithm`, and the keying\nmaterial provided by `baseKey`, this method attempts to generate\na new {CryptoKey} based on the method and parameters in `derivedKeyType`.\n\nCalling this method is equivalent to calling [`subtle.deriveBits()`](#subtlederivebitsalgorithm-basekey-length) to\ngenerate raw keying material, then passing the result into the\n[`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages) method using the `derivedKeyType`, `extractable`, and\n`keyUsages` parameters as input.\n\nThe algorithms currently supported include:\n\n* `'Argon2d'`[^modern-algos]\n* `'Argon2i'`[^modern-algos]\n* `'Argon2id'`[^modern-algos]\n* `'ECDH'`\n* `'HKDF'`\n* `'PBKDF2'`\n* `'X25519'`\n* `'X448'`[^secure-curves]","summary":"Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, this method attempts to generate a new {CryptoKey} based on the method and parameters in `derivedKeyType`.","examples":[],"children":[]},{"kind":"method","id":"subtledigestalgorithm-data","name":"digest","title":"`subtle.digest(algorithm, data)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.9.0"],"prUrl":"https://github.com/nodejs/node/pull/62183","commit":null,"description":"TurboSHAKE and KangarooTwelve algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHAKE algorithms are now supported."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"string | Algorithm | CShakeParams | TurboShakeParams | KangarooTwelveParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"CShakeParams","href":"webcrypto.html#class-cshakeparams","start":21,"end":33},{"name":"TurboShakeParams","href":"webcrypto.html#class-turboshakeparams","start":36,"end":52},{"name":"KangarooTwelveParams","href":"webcrypto.html#class-kangarootwelveparams","start":55,"end":75}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"data","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"Using the method identified by `algorithm`, this method attempts to\ngenerate a digest of `data`. If successful, the returned promise is resolved\nwith an {ArrayBuffer} containing the computed digest.\n\nIf `algorithm` is provided as a {string}, it must be one of:\n\n* `'cSHAKE128'`[^modern-algos]\n* `'cSHAKE256'`[^modern-algos]\n* `'KT128'`[^modern-algos]\n* `'KT256'`[^modern-algos]\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n* `'TurboSHAKE128'`[^modern-algos]\n* `'TurboSHAKE256'`[^modern-algos]\n\nIf `algorithm` is provided as an {Object}, it must have a `name` property\nwhose value is one of the above.","summary":"Using the method identified by `algorithm`, this method attempts to generate a digest of `data`. If successful, the returned promise is resolved with an {ArrayBuffer} containing the computed digest.","examples":[],"children":[]},{"kind":"method","id":"subtleencapsulatebitsencapsulationalgorithm-encapsulationkey","name":"encapsulateBits","title":"`subtle.encapsulateBits(encapsulationAlgorithm, encapsulationKey)`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"encapsulationAlgorithm","type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"encapsulationKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with {EncapsulatedBits} upon success."}},"description":"Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key.\nThis encrypted key is the \"encapsulated key\" represented as {EncapsulatedBits}.\n\nThe algorithms currently supported include:\n\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]","summary":"Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key. This encrypted key is the \"encapsulated key\" represented as {EncapsulatedBits}.","examples":[],"children":[]},{"kind":"method","id":"subtleencapsulatekeyencapsulationalgorithm-encapsulationkey-sharedkeyalgorithm-extractable-keyusages","name":"encapsulateKey","title":"`subtle.encapsulateKey(encapsulationAlgorithm, encapsulationKey, sharedKeyAlgorithm, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"encapsulationAlgorithm","type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"encapsulationKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"sharedKeyAlgorithm","type":{"text":"string | Algorithm | HmacImportParams | AesDerivedKeyParams | KmacImportParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"HmacImportParams","href":"webcrypto.html#class-hmacimportparams","start":21,"end":37},{"name":"AesDerivedKeyParams","href":"webcrypto.html#class-aesderivedkeyparams","start":40,"end":59},{"name":"KmacImportParams","href":"webcrypto.html#class-kmacimportparams","start":62,"end":78}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":{"text":"boolean","links":[{"name":"boolean","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type","start":0,"end":7}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":{"text":"string[]","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"See [Key usages](#cryptokeyusages).","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with {EncapsulatedKey} upon success."}},"description":"Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key.\nThis encrypted key is the \"encapsulated key\" represented as {EncapsulatedKey}.\n\nThe algorithms currently supported include:\n\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]","summary":"Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key. This encrypted key is the \"encapsulated key\" represented as {EncapsulatedKey}.","examples":[],"children":[]},{"kind":"method","id":"subtleencryptalgorithm-key-data","name":"encrypt","title":"`subtle.encrypt(algorithm, key, data)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59539","commit":null,"description":"AES-OCB algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams","links":[{"name":"RsaOaepParams","href":"webcrypto.html#class-rsaoaepparams","start":0,"end":13},{"name":"AesCtrParams","href":"webcrypto.html#class-aesctrparams","start":16,"end":28},{"name":"AesCbcParams","href":"webcrypto.html#class-aescbcparams","start":31,"end":43},{"name":"AeadParams","href":"webcrypto.html#class-aeadparams","start":46,"end":56}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"data","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"Using the method and parameters specified by `algorithm` and the keying\nmaterial provided by `key`, this method attempts to encipher `data`.\nIf successful, the returned promise is resolved with an {ArrayBuffer}\ncontaining the encrypted result.\n\nThe algorithms currently supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'RSA-OAEP'`","summary":"Using the method and parameters specified by `algorithm` and the keying material provided by `key`, this method attempts to encipher `data`. If successful, the returned promise is resolved with an {ArrayBuffer} containing the encrypted result.","examples":[],"children":[]},{"kind":"method","id":"subtleexportkeyformat-key","name":"exportKey","title":"`subtle.exportKey(format, key)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.1.0"],"prUrl":"https://github.com/nodejs/node/pull/62706","commit":null,"description":"Added JWK format support for ML-KEM key types."},{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59569","commit":null,"description":"ML-KEM algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'Ed25519'`, `'Ed448'`, `'X25519'`, and `'X448'` algorithms."},{"versions":["v15.9.0"],"prUrl":"https://github.com/nodejs/node/pull/37203","commit":null,"description":"Removed `'NODE-DSA'` JWK export."}],"signature":{"parameters":[{"name":"format","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, `'raw-secret'`[^modern-algos],\n`'raw-public'`[^modern-algos], or `'raw-seed'`[^modern-algos].","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer | Object} upon success."}},"description":"Exports the given key into the specified format, if supported.\n\nIf the {CryptoKey} is not extractable, the returned promise will reject.\n\nWhen `format` is either `'pkcs8'` or `'spki'` and the export is successful,\nthe returned promise will be resolved with an {ArrayBuffer} containing the\nexported key data.\n\nWhen `format` is `'jwk'` and the export is successful, the returned promise\nwill be resolved with a JavaScript object conforming to the [JSON Web Key](https://tools.ietf.org/html/rfc7517)\nspecification.\n\nSee [Key formats](#key-formats) for the formats supported by each algorithm.","summary":"Exports the given key into the specified format, if supported.","examples":[],"children":[]},{"kind":"method","id":"subtlegetpublickeykey-keyusages","name":"getPublicKey","title":"`subtle.getPublicKey(key, keyUsages)`","scope":"module","overloadOf":null,"stability":{"index":"1.1","description":"Active development"},"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"A private key from which to derive the corresponding public key.","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":{"text":"string[]","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"See [Key usages](#cryptokeyusages).","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with a {CryptoKey} upon success."}},"description":"Derives the public key from a given private key.","summary":"Derives the public key from a given private key.","examples":[],"children":[]},{"kind":"method","id":"subtlegeneratekeyalgorithm-extractable-keyusages","name":"generateKey","title":"`subtle.generateKey(algorithm, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59569","commit":null,"description":"ML-KEM algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"string | Algorithm | RsaHashedKeyGenParams | EcKeyGenParams | HmacKeyGenParams | AesKeyGenParams | KmacKeyGenParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"RsaHashedKeyGenParams","href":"webcrypto.html#class-rsahashedkeygenparams","start":21,"end":42},{"name":"EcKeyGenParams","href":"webcrypto.html#class-eckeygenparams","start":45,"end":59},{"name":"HmacKeyGenParams","href":"webcrypto.html#class-hmackeygenparams","start":62,"end":78},{"name":"AesKeyGenParams","href":"webcrypto.html#class-aeskeygenparams","start":81,"end":96},{"name":"KmacKeyGenParams","href":"webcrypto.html#class-kmackeygenparams","start":99,"end":115}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":null},"description":"* `extractable` {boolean}\n* `keyUsages` {string[]} See [Key usages](#cryptokeyusages).\n* Returns: {Promise} Fulfills with a {CryptoKey | CryptoKeyPair} upon success.\n\nUsing the parameters provided in `algorithm`, this method\nattempts to generate new keying material. Depending on the algorithm used\neither a single {CryptoKey} or a {CryptoKeyPair} is generated.\n\nThe {CryptoKeyPair} (public and private key) generating algorithms supported\ninclude:\n\n* `'ECDH'`\n* `'ECDSA'`\n* `'Ed25519'`\n* `'Ed448'`[^secure-curves]\n* `'ML-DSA-44'`[^modern-algos]\n* `'ML-DSA-65'`[^modern-algos]\n* `'ML-DSA-87'`[^modern-algos]\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]\n* `'RSA-OAEP'`\n* `'RSA-PSS'`\n* `'RSASSA-PKCS1-v1_5'`\n* `'X25519'`\n* `'X448'`[^secure-curves]\n\nThe {CryptoKey} (secret key) generating algorithms supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-KW'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'HMAC'`\n* `'KMAC128'`[^modern-algos]\n* `'KMAC256'`[^modern-algos]","summary":"Using the parameters provided in `algorithm`, this method attempts to generate new keying material. Depending on the algorithm used either a single {CryptoKey} or a {CryptoKeyPair} is generated.","examples":[],"children":[]},{"kind":"method","id":"subtleimportkeyformat-keydata-algorithm-extractable-keyusages","name":"importKey","title":"`subtle.importKey(format, keyData, algorithm, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.1.0"],"prUrl":"https://github.com/nodejs/node/pull/62706","commit":null,"description":"Added JWK format support for ML-KEM key types."},{"versions":["v25.9.0"],"prUrl":"https://github.com/nodejs/node/pull/62218","commit":null,"description":"Importing ML-DSA and ML-KEM PKCS#8 keys without a seed is no longer supported."},{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59569","commit":null,"description":"ML-KEM algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'Ed25519'`, `'Ed448'`, `'X25519'`, and `'X448'` algorithms."},{"versions":["v15.9.0"],"prUrl":"https://github.com/nodejs/node/pull/37203","commit":null,"description":"Removed `'NODE-DSA'` JWK import."}],"signature":{"parameters":[{"name":"format","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, `'raw-secret'`[^modern-algos],\n`'raw-public'`[^modern-algos], or `'raw-seed'`[^modern-algos].","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyData","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | Object","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":47,"end":53}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"algorithm","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":null},"description":"* `algorithm` {string | Algorithm | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | KmacImportParams}\n\n- `extractable` {boolean}\n- `keyUsages` {string[]} See [Key usages](#cryptokeyusages).\n- Returns: {Promise} Fulfills with a {CryptoKey} upon success.\n\nThis method attempts to interpret the provided `keyData`\nas the given `format` to create a {CryptoKey} instance using the provided\n`algorithm`, `extractable`, and `keyUsages` arguments. If the import is\nsuccessful, the returned promise will be resolved with a {CryptoKey}\nrepresentation of the key material.\n\nIf importing KDF algorithm keys, `extractable` must be `false`.\n\nSee [Key formats](#key-formats) for the algorithms and formats currently supported.","summary":"This method attempts to interpret the provided `keyData` 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 a {CryptoKey} representation of the key material.","examples":[],"children":[]},{"kind":"method","id":"subtlesignalgorithm-key-data","name":"sign","title":"`subtle.sign(algorithm, key, data)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'Ed25519'`, and `'Ed448'` algorithms."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"string | Algorithm | RsaPssParams | EcdsaParams | ContextParams | KmacParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"RsaPssParams","href":"webcrypto.html#class-rsapssparams","start":21,"end":33},{"name":"EcdsaParams","href":"webcrypto.html#class-ecdsaparams","start":36,"end":47},{"name":"ContextParams","href":"webcrypto.html#class-contextparams","start":50,"end":63},{"name":"KmacParams","href":"webcrypto.html#class-kmacparams","start":66,"end":76}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"data","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"Using the method and parameters given by `algorithm` and the keying material\nprovided by `key`, this method attempts to generate a cryptographic\nsignature of `data`. If successful, the returned promise is resolved with\nan {ArrayBuffer} containing the generated signature.\n\nThe algorithms currently supported include:\n\n* `'ECDSA'`\n* `'Ed25519'`\n* `'Ed448'`[^secure-curves]\n* `'HMAC'`\n* `'KMAC128'`[^modern-algos]\n* `'KMAC256'`[^modern-algos]\n* `'ML-DSA-44'`[^modern-algos]\n* `'ML-DSA-65'`[^modern-algos]\n* `'ML-DSA-87'`[^modern-algos]\n* `'RSA-PSS'`\n* `'RSASSA-PKCS1-v1_5'`","summary":"Using the method and parameters given by `algorithm` and the keying material provided by `key`, this method attempts to generate a cryptographic signature of `data`. If successful, the returned promise is resolved with an {ArrayBuffer} containing the generated signature.","examples":[],"children":[]},{"kind":"method","id":"subtleunwrapkeyformat-wrappedkey-unwrappingkey-unwrapalgorithm-unwrappedkeyalgorithm-extractable-keyusages","name":"unwrapKey","title":"`subtle.unwrapKey(format, wrappedKey, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59539","commit":null,"description":"AES-OCB algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."}],"signature":{"parameters":[{"name":"format","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, `'raw-secret'`[^modern-algos],\n`'raw-public'`[^modern-algos], or `'raw-seed'`[^modern-algos].","default":null,"optional":false,"rest":false,"properties":[]},{"name":"wrappedKey","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"unwrappingKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"unwrapAlgorithm","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"unwrappedKeyAlgorithm","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"extractable","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"keyUsages","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":null},"description":"* `unwrapAlgorithm` {string | Algorithm | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams}\n* `unwrappedKeyAlgorithm` {string | Algorithm | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | KmacImportParams}\n\n- `extractable` {boolean}\n- `keyUsages` {string[]} See [Key usages](#cryptokeyusages).\n- Returns: {Promise} Fulfills with a {CryptoKey} upon success.\n\nIn cryptography, \"wrapping a key\" refers to exporting and then encrypting the\nkeying material. This method attempts to decrypt a wrapped\nkey and create a {CryptoKey} instance. It is equivalent to calling\n[`subtle.decrypt()`](#subtledecryptalgorithm-key-data) first on the encrypted key data (using the `wrappedKey`,\n`unwrapAlgorithm`, and `unwrappingKey` arguments as input) then passing the results\nto the [`subtle.importKey()`](#subtleimportkeyformat-keydata-algorithm-extractable-keyusages) method using the `unwrappedKeyAlgorithm`,\n`extractable`, and `keyUsages` arguments as inputs. If successful, the returned\npromise is resolved with a {CryptoKey} object.\n\nThe wrapping algorithms currently supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-KW'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'RSA-OAEP'`\n\nThe unwrapped key algorithms supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-KW'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'ECDH'`\n* `'ECDSA'`\n* `'Ed25519'`\n* `'Ed448'`[^secure-curves]\n* `'HMAC'`\n* `'KMAC128'`[^modern-algos]\n* `'KMAC256'`[^modern-algos]\n* `'ML-DSA-44'`[^modern-algos]\n* `'ML-DSA-65'`[^modern-algos]\n* `'ML-DSA-87'`[^modern-algos]\n* `'ML-KEM-512'`[^modern-algos]\n* `'ML-KEM-768'`[^modern-algos]\n* `'ML-KEM-1024'`[^modern-algos]\n* `'RSA-OAEP'`\n* `'RSA-PSS'`\n* `'RSASSA-PKCS1-v1_5'`\n* `'X25519'`\n* `'X448'`[^secure-curves]","summary":"In cryptography, \"wrapping a key\" refers to exporting and then encrypting the keying material. This method attempts to decrypt a wrapped key and create a {CryptoKey} instance. It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgorithm`, and `unwrappingKey` arguments as input) then passing the results to the `subtle.importKey()` method using the `unwrappedKeyAlgorithm`, `extractable`, and `keyUsages` arguments as inputs. If successful, the returned promise is resolved with a {CryptoKey} object.","examples":[],"children":[]},{"kind":"method","id":"subtleverifyalgorithm-key-signature-data","name":"verify","title":"`subtle.verify(algorithm, key, signature, data)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59647","commit":null,"description":"KMAC algorithms are now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ML-DSA algorithms are now supported."},{"versions":["v18.4.0","v16.17.0"],"prUrl":"https://github.com/nodejs/node/pull/42507","commit":null,"description":"Added `'Ed25519'`, and `'Ed448'` algorithms."}],"signature":{"parameters":[{"name":"algorithm","type":{"text":"string | Algorithm | RsaPssParams | EcdsaParams | ContextParams | KmacParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"RsaPssParams","href":"webcrypto.html#class-rsapssparams","start":21,"end":33},{"name":"EcdsaParams","href":"webcrypto.html#class-ecdsaparams","start":36,"end":47},{"name":"ContextParams","href":"webcrypto.html#class-contextparams","start":50,"end":63},{"name":"KmacParams","href":"webcrypto.html#class-kmacparams","start":66,"end":76}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"signature","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"data","type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with a {boolean} upon success."}},"description":"Using the method and parameters given in `algorithm` and the keying material\nprovided by `key`, this method attempts to verify that `signature` is\na valid cryptographic signature of `data`. The returned promise is resolved\nwith either `true` or `false`.\n\nThe algorithms currently supported include:\n\n* `'ECDSA'`\n* `'Ed25519'`\n* `'Ed448'`[^secure-curves]\n* `'HMAC'`\n* `'KMAC128'`[^modern-algos]\n* `'KMAC256'`[^modern-algos]\n* `'ML-DSA-44'`[^modern-algos]\n* `'ML-DSA-65'`[^modern-algos]\n* `'ML-DSA-87'`[^modern-algos]\n* `'RSA-PSS'`\n* `'RSASSA-PKCS1-v1_5'`","summary":"Using the method and parameters given in `algorithm` and the keying material provided by `key`, this method attempts to verify that `signature` is a valid cryptographic signature of `data`. The returned promise is resolved with either `true` or `false`.","examples":[],"children":[]},{"kind":"method","id":"subtlewrapkeyformat-key-wrappingkey-wrapalgorithm","name":"wrapKey","title":"`subtle.wrapKey(format, key, wrappingKey, wrapAlgorithm)`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59539","commit":null,"description":"AES-OCB algorithm is now supported."},{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"ChaCha20-Poly1305 algorithm is now supported."}],"signature":{"parameters":[{"name":"format","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, `'raw-secret'`[^modern-algos],\n`'raw-public'`[^modern-algos], or `'raw-seed'`[^modern-algos].","default":null,"optional":false,"rest":false,"properties":[]},{"name":"key","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"wrappingKey","type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"wrapAlgorithm","type":{"text":"string | Algorithm | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18},{"name":"RsaOaepParams","href":"webcrypto.html#class-rsaoaepparams","start":21,"end":34},{"name":"AesCtrParams","href":"webcrypto.html#class-aesctrparams","start":37,"end":49},{"name":"AesCbcParams","href":"webcrypto.html#class-aescbcparams","start":52,"end":64},{"name":"AeadParams","href":"webcrypto.html#class-aeadparams","start":67,"end":77}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]}],"returns":{"type":{"text":"Promise","links":[{"name":"Promise","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise","start":0,"end":7}]},"description":"Fulfills with an {ArrayBuffer} upon success."}},"description":"In cryptography, \"wrapping a key\" refers to exporting and then encrypting the\nkeying material. This method exports the keying material into\nthe format identified by `format`, then encrypts it using the method and\nparameters specified by `wrapAlgorithm` and the keying material provided by\n`wrappingKey`. It is the equivalent to calling [`subtle.exportKey()`](#subtleexportkeyformat-key) using\n`format` and `key` as the arguments, then passing the result to the\n[`subtle.encrypt()`](#subtleencryptalgorithm-key-data) method using `wrappingKey` and `wrapAlgorithm` as inputs. If\nsuccessful, the returned promise will be resolved with an {ArrayBuffer}\ncontaining the encrypted key data.\n\nThe wrapping algorithms currently supported include:\n\n* `'AES-CBC'`\n* `'AES-CTR'`\n* `'AES-GCM'`\n* `'AES-KW'`\n* `'AES-OCB'`[^modern-algos]\n* `'ChaCha20-Poly1305'`[^modern-algos]\n* `'RSA-OAEP'`","summary":"In cryptography, \"wrapping a key\" refers to exporting and then encrypting the keying material. This method exports the keying material into the format identified by `format`, then encrypts it using the method and parameters specified by `wrapAlgorithm` and the keying material provided by `wrappingKey`. It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgorithm` as inputs. If successful, the returned promise will be resolved with an {ArrayBuffer} containing the encrypted key data.","examples":[],"children":[]}]},{"kind":"section","id":"algorithm-parameters","name":"Algorithm parameters","title":"Algorithm parameters","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The algorithm parameter objects define the methods and parameters used by\nthe various {SubtleCrypto} methods. While described here as \"classes\", they\nare simple JavaScript dictionary objects.","summary":"The algorithm parameter objects define the methods and parameters used by the various {SubtleCrypto} methods. While described here as \"classes\", they are simple JavaScript dictionary objects.","examples":[],"children":[{"kind":"class","id":"class-algorithm","name":"Algorithm","title":"Class: `Algorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"algorithmname","name":"name","title":"`Algorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-aeadparams","name":"AeadParams","title":"Class: `AeadParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aeadparamsadditionaldata","name":"additionalData","title":"`aeadParams.additionalData`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"Extra input that is not encrypted but is included in the authentication\nof the data. The use of `additionalData` is optional.","summary":"Extra input that is not encrypted but is included in the authentication of the data. The use of `additionalData` is optional.","examples":[],"children":[]},{"kind":"property","id":"aeadparamsiv","name":"iv","title":"`aeadParams.iv`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"The initialization vector must be unique for every encryption operation using a\ngiven key.","summary":"The initialization vector must be unique for every encryption operation using a given key.","examples":[],"children":[]},{"kind":"property","id":"aeadparamsname","name":"name","title":"`aeadParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'AES-GCM'`, `'AES-OCB'`, or `'ChaCha20-Poly1305'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"aeadparamstaglength","name":"tagLength","title":"`aeadParams.tagLength`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The size in bits of the generated authentication tag.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-aesderivedkeyparams","name":"AesDerivedKeyParams","title":"Class: `AesDerivedKeyParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aesderivedkeyparamsname","name":"name","title":"`aesDerivedKeyParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`, `'AES-OCB'`, or `'AES-KW'`","summary":"","examples":[],"children":[]},{"kind":"property","id":"aesderivedkeyparamslength","name":"length","title":"`aesDerivedKeyParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length of the AES key to be derived. This must be either `128`, `192`,\nor `256`.","summary":"The length of the AES key to be derived. This must be either `128`, `192`, or `256`.","examples":[],"children":[]}]},{"kind":"class","id":"class-aescbcparams","name":"AesCbcParams","title":"Class: `AesCbcParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aescbcparamsiv","name":"iv","title":"`aesCbcParams.iv`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Provides the initialization vector. It must be exactly 16-bytes in length\nand should be unpredictable and cryptographically random.","summary":"Provides the initialization vector. It must be exactly 16-bytes in length and should be unpredictable and cryptographically random.","examples":[],"children":[]},{"kind":"property","id":"aescbcparamsname","name":"name","title":"`aesCbcParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'AES-CBC'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-aesctrparams","name":"AesCtrParams","title":"Class: `AesCtrParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aesctrparamscounter","name":"counter","title":"`aesCtrParams.counter`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"The initial value of the counter block. This must be exactly 16 bytes long.\n\nThe `AES-CTR` method uses the rightmost `length` bits of the block as the\ncounter and the remaining bits as the nonce.","summary":"The initial value of the counter block. This must be exactly 16 bytes long.","examples":[],"children":[]},{"kind":"property","id":"aesctrparamslength","name":"length","title":"`aesCtrParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The number of bits in the `aesCtrParams.counter` that are\nto be used as the counter.","summary":"","examples":[],"children":[]},{"kind":"property","id":"aesctrparamsname","name":"name","title":"`aesCtrParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'AES-CTR'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-aeskeyalgorithm","name":"AesKeyAlgorithm","title":"Class: `AesKeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aeskeyalgorithmlength","name":"length","title":"`aesKeyAlgorithm.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length of the AES key in bits.","summary":"The length of the AES key in bits.","examples":[],"children":[]},{"kind":"property","id":"aeskeyalgorithmname","name":"name","title":"`aesKeyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-aeskeygenparams","name":"AesKeyGenParams","title":"Class: `AesKeyGenParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"aeskeygenparamslength","name":"length","title":"`aesKeyGenParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length of the AES key to be generated. This must be either `128`, `192`,\nor `256`.","summary":"The length of the AES key to be generated. This must be either `128`, `192`, or `256`.","examples":[],"children":[]},{"kind":"property","id":"aeskeygenparamsname","name":"name","title":"`aesKeyGenParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`, or\n`'AES-KW'`","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-argon2params","name":"Argon2Params","title":"Class: `Argon2Params`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"argon2paramsassociateddata","name":"associatedData","title":"`argon2Params.associatedData`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Represents the optional associated data.","summary":"Represents the optional associated data.","examples":[],"children":[]},{"kind":"property","id":"argon2paramsmemory","name":"memory","title":"`argon2Params.memory`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"Represents the memory size in kibibytes. It must be at least 8 times the degree of parallelism.","summary":"Represents the memory size in kibibytes. It must be at least 8 times the degree of parallelism.","examples":[],"children":[]},{"kind":"property","id":"argon2paramsname","name":"name","title":"`argon2Params.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'Argon2d'`, `'Argon2i'`, or `'Argon2id'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"argon2paramsnonce","name":"nonce","title":"`argon2Params.nonce`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Represents the nonce, which is a salt for password hashing applications.","summary":"Represents the nonce, which is a salt for password hashing applications.","examples":[],"children":[]},{"kind":"property","id":"argon2paramsparallelism","name":"parallelism","title":"`argon2Params.parallelism`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"Represents the degree of parallelism.","summary":"Represents the degree of parallelism.","examples":[],"children":[]},{"kind":"property","id":"argon2paramspasses","name":"passes","title":"`argon2Params.passes`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"Represents the number of passes.","summary":"Represents the number of passes.","examples":[],"children":[]},{"kind":"property","id":"argon2paramssecretvalue","name":"secretValue","title":"`argon2Params.secretValue`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Represents the optional secret value.","summary":"Represents the optional secret value.","examples":[],"children":[]},{"kind":"property","id":"argon2paramsversion","name":"version","title":"`argon2Params.version`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"Represents the Argon2 version number. The default and currently only defined version is `19` (`0x13`).","summary":"Represents the Argon2 version number. The default and currently only defined version is `19` (`0x13`).","examples":[],"children":[]}]},{"kind":"class","id":"class-contextparams","name":"ContextParams","title":"Class: `ContextParams`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"contextparamsname","name":"name","title":"`contextParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'Ed448'`[^secure-curves], `'ML-DSA-44'`[^modern-algos],\n`'ML-DSA-65'`[^modern-algos], or `'ML-DSA-87'`[^modern-algos].","summary":"","examples":[],"children":[]},{"kind":"property","id":"contextparamscontext","name":"context","title":"`contextParams.context`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.8.0"],"prUrl":"https://github.com/nodejs/node/pull/59570","commit":null,"description":"Non-empty context is now supported."}],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"The `context` member represents the optional context data to associate with\nthe message.","summary":"The `context` member represents the optional context data to associate with the message.","examples":[],"children":[]}]},{"kind":"class","id":"class-cshakeparams","name":"CShakeParams","title":"Class: `CShakeParams`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.9.0"],"prUrl":"https://github.com/nodejs/node/pull/61875","commit":null,"description":"Renamed `cShakeParams.length` to `cShakeParams.outputLength`."}],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"cshakeparamsname","name":"name","title":"`cShakeParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'cSHAKE128'`[^modern-algos] or `'cSHAKE256'`[^modern-algos].","summary":"","examples":[],"children":[]},{"kind":"property","id":"cshakeparamsoutputlength","name":"outputLength","title":"`cShakeParams.outputLength`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"represents the requested output length in bits.","summary":"","examples":[],"children":[]},{"kind":"property","id":"cshakeparamsfunctionname","name":"functionName","title":"`cShakeParams.functionName`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.4.0"],"prUrl":"https://github.com/nodejs/node/pull/63988","commit":null,"description":"Named cSHAKE variants are now accepted."}],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"The `functionName` member represents the NIST function-name byte string used to\ndomain-separate functions built on top of cSHAKE. Accepted values are:\n\n* empty or `undefined`, in which case cSHAKE is equivalent to plain SHAKE\n* the ASCII byte sequence `'KMAC'`\n* the ASCII byte sequence `'TupleHash'`\n* the ASCII byte sequence `'ParallelHash'`","summary":"The `functionName` member represents the NIST function-name byte string used to domain-separate functions built on top of cSHAKE. Accepted values are:","examples":[],"children":[]},{"kind":"property","id":"cshakeparamscustomization","name":"customization","title":"`cShakeParams.customization`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.4.0"],"prUrl":"https://github.com/nodejs/node/pull/63988","commit":null,"description":"Non-empty customization is now supported."}],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"The `customization` member represents the customization data. Accepted\nvalues are:\n\n* empty or `undefined`, in which case cSHAKE is equivalent to plain SHAKE\n* up to 512 bytes of arbitrary data","summary":"The `customization` member represents the customization data. Accepted values are:","examples":[],"children":[]}]},{"kind":"class","id":"class-ecdhkeyderiveparams","name":"EcdhKeyDeriveParams","title":"Class: `EcdhKeyDeriveParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"ecdhkeyderiveparamsname","name":"name","title":"`ecdhKeyDeriveParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'ECDH'`, `'X25519'`, or `'X448'`[^secure-curves].","summary":"","examples":[],"children":[]},{"kind":"property","id":"ecdhkeyderiveparamspublic","name":"public","title":"`ecdhKeyDeriveParams.public`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"default":null,"description":"ECDH key derivation operates by taking as input one party's private key and\nanother party's public key -- using both to generate a common shared secret.\nThe `ecdhKeyDeriveParams.public` property is set to the other party's public\nkey.","summary":"ECDH key derivation operates by taking as input one party's private key and another party's public key -- using both to generate a common shared secret. The `ecdhKeyDeriveParams.public` property is set to the other party's public key.","examples":[],"children":[]}]},{"kind":"class","id":"class-ecdsaparams","name":"EcdsaParams","title":"Class: `EcdsaParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"ecdsaparamshash","name":"hash","title":"`ecdsaParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"ecdsaparamsname","name":"name","title":"`ecdsaParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'ECDSA'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-eckeyalgorithm","name":"EcKeyAlgorithm","title":"Class: `EcKeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"eckeyalgorithmname","name":"name","title":"`ecKeyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"eckeyalgorithmnamedcurve","name":"namedCurve","title":"`ecKeyAlgorithm.namedCurve`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-eckeygenparams","name":"EcKeyGenParams","title":"Class: `EcKeyGenParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"eckeygenparamsname","name":"name","title":"`ecKeyGenParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'ECDSA'` or `'ECDH'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"eckeygenparamsnamedcurve","name":"namedCurve","title":"`ecKeyGenParams.namedCurve`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'P-256'`, `'P-384'`, `'P-521'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-eckeyimportparams","name":"EcKeyImportParams","title":"Class: `EcKeyImportParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"eckeyimportparamsname","name":"name","title":"`ecKeyImportParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'ECDSA'` or `'ECDH'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"eckeyimportparamsnamedcurve","name":"namedCurve","title":"`ecKeyImportParams.namedCurve`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'P-256'`, `'P-384'`, `'P-521'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-encapsulatedbits","name":"EncapsulatedBits","title":"Class: `EncapsulatedBits`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"A temporary symmetric secret key (represented as {ArrayBuffer}) for message encryption\nand the ciphertext (that can be transmitted to the message recipient along with the\nmessage) encrypted by this shared key. The recipient uses their private key to determine\nwhat the shared key is which then allows them to decrypt the message.","summary":"A temporary symmetric secret key (represented as {ArrayBuffer}) for message encryption and the ciphertext (that can be transmitted to the message recipient along with the message) encrypted by this shared key. The recipient uses their private key to determine what the shared key is which then allows them to decrypt the message.","examples":[],"children":[{"kind":"property","id":"encapsulatedbitsciphertext","name":"ciphertext","title":"`encapsulatedBits.ciphertext`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"encapsulatedbitssharedkey","name":"sharedKey","title":"`encapsulatedBits.sharedKey`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-encapsulatedkey","name":"EncapsulatedKey","title":"Class: `EncapsulatedKey`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"A temporary symmetric secret key (represented as {CryptoKey}) for message encryption\nand the ciphertext (that can be transmitted to the message recipient along with the\nmessage) encrypted by this shared key. The recipient uses their private key to determine\nwhat the shared key is which then allows them to decrypt the message.","summary":"A temporary symmetric secret key (represented as {CryptoKey}) for message encryption and the ciphertext (that can be transmitted to the message recipient along with the message) encrypted by this shared key. The recipient uses their private key to determine what the shared key is which then allows them to decrypt the message.","examples":[],"children":[{"kind":"property","id":"encapsulatedkeyciphertext","name":"ciphertext","title":"`encapsulatedKey.ciphertext`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"encapsulatedkeysharedkey","name":"sharedKey","title":"`encapsulatedKey.sharedKey`","scope":"module","overloadOf":null,"stability":null,"added":["v24.7.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"CryptoKey","links":[{"name":"CryptoKey","href":"webcrypto.html#class-cryptokey","start":0,"end":9}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-hkdfparams","name":"HkdfParams","title":"Class: `HkdfParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"hkdfparamshash","name":"hash","title":"`hkdfParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"hkdfparamsinfo","name":"info","title":"`hkdfParams.info`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Provides application-specific contextual input to the HKDF algorithm.\nThis can be zero-length but must be provided.","summary":"Provides application-specific contextual input to the HKDF algorithm. This can be zero-length but must be provided.","examples":[],"children":[]},{"kind":"property","id":"hkdfparamsname","name":"name","title":"`hkdfParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'HKDF'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"hkdfparamssalt","name":"salt","title":"`hkdfParams.salt`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"The salt value significantly improves the strength of the HKDF algorithm.\nIt should be random or pseudorandom and should be the same length as the\noutput of the digest function (for instance, if using `'SHA-256'` as the\ndigest, the salt should be 256-bits of random data).","summary":"The salt value significantly improves the strength of the HKDF algorithm. It should be random or pseudorandom and should be the same length as the output of the digest function (for instance, if using `'SHA-256'` as the digest, the salt should be 256-bits of random data).","examples":[],"children":[]}]},{"kind":"class","id":"class-hmacimportparams","name":"HmacImportParams","title":"Class: `HmacImportParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"hmacimportparamshash","name":"hash","title":"`hmacImportParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"hmacimportparamslength","name":"length","title":"`hmacImportParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The optional number of bits in the HMAC key. This is optional and should\nbe omitted for most cases.","summary":"The optional number of bits in the HMAC key. This is optional and should be omitted for most cases.","examples":[],"children":[]},{"kind":"property","id":"hmacimportparamsname","name":"name","title":"`hmacImportParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'HMAC'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-hmackeyalgorithm","name":"HmacKeyAlgorithm","title":"Class: `HmacKeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"hmackeyalgorithmhash","name":"hash","title":"`hmacKeyAlgorithm.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"Algorithm","links":[{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":0,"end":9}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"hmackeyalgorithmlength","name":"length","title":"`hmacKeyAlgorithm.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length of the HMAC key in bits.","summary":"The length of the HMAC key in bits.","examples":[],"children":[]},{"kind":"property","id":"hmackeyalgorithmname","name":"name","title":"`hmacKeyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-hmackeygenparams","name":"HmacKeyGenParams","title":"Class: `HmacKeyGenParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"hmackeygenparamshash","name":"hash","title":"`hmacKeyGenParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"hmackeygenparamslength","name":"length","title":"`hmacKeyGenParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The number of bits to generate for the HMAC key. If omitted,\nthe length will be determined by the hash algorithm used.\nThis is optional and should be omitted for most cases.","summary":"The number of bits to generate for the HMAC key. If omitted, the length will be determined by the hash algorithm used. This is optional and should be omitted for most cases.","examples":[],"children":[]},{"kind":"property","id":"hmackeygenparamsname","name":"name","title":"`hmacKeyGenParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'HMAC'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-keyalgorithm","name":"KeyAlgorithm","title":"Class: `KeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"keyalgorithmname","name":"name","title":"`keyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-kangarootwelveparams","name":"KangarooTwelveParams","title":"Class: `KangarooTwelveParams`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"kangarootwelveparamscustomization","name":"customization","title":"`kangarooTwelveParams.customization`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v26.6.0"],"prUrl":"https://github.com/nodejs/node/pull/64557","commit":null,"description":"Limit customization to 512 bytes."}],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"The optional customization string for KangarooTwelve. It must not exceed 512\nbytes.","summary":"The optional customization string for KangarooTwelve. It must not exceed 512 bytes.","examples":[],"children":[]},{"kind":"property","id":"kangarootwelveparamsname","name":"name","title":"`kangarooTwelveParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'KT128'`[^modern-algos] or `'KT256'`[^modern-algos].","summary":"","examples":[],"children":[]},{"kind":"property","id":"kangarootwelveparamsoutputlength","name":"outputLength","title":"`kangarooTwelveParams.outputLength`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"represents the requested output length in bits.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-kmacimportparams","name":"KmacImportParams","title":"Class: `KmacImportParams`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"kmacimportparamslength","name":"length","title":"`kmacImportParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The optional number of bits in the KMAC key. This is optional and should\nbe omitted for most cases.","summary":"The optional number of bits in the KMAC key. This is optional and should be omitted for most cases.","examples":[],"children":[]},{"kind":"property","id":"kmacimportparamsname","name":"name","title":"`kmacImportParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'KMAC128'` or `'KMAC256'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-kmackeyalgorithm","name":"KmacKeyAlgorithm","title":"Class: `KmacKeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"kmackeyalgorithmlength","name":"length","title":"`kmacKeyAlgorithm.length`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length of the KMAC key in bits.","summary":"The length of the KMAC key in bits.","examples":[],"children":[]},{"kind":"property","id":"kmackeyalgorithmname","name":"name","title":"`kmacKeyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-kmackeygenparams","name":"KmacKeyGenParams","title":"Class: `KmacKeyGenParams`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"kmackeygenparamslength","name":"length","title":"`kmacKeyGenParams.length`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The number of bits to generate for the KMAC key. If omitted,\nthe length will be determined by the KMAC algorithm used.\nThis is optional and should be omitted for most cases.","summary":"The number of bits to generate for the KMAC key. If omitted, the length will be determined by the KMAC algorithm used. This is optional and should be omitted for most cases.","examples":[],"children":[]},{"kind":"property","id":"kmackeygenparamsname","name":"name","title":"`kmacKeyGenParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'KMAC128'` or `'KMAC256'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-kmacparams","name":"KmacParams","title":"Class: `KmacParams`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v25.9.0"],"prUrl":"https://github.com/nodejs/node/pull/61875","commit":null,"description":"Renamed `kmacParams.length` to `kmacParams.outputLength`."}],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"kmacparamsalgorithm","name":"algorithm","title":"`kmacParams.algorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'KMAC128'` or `'KMAC256'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"kmacparamsoutputlength","name":"outputLength","title":"`kmacParams.outputLength`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"represents the requested output length in bits.","summary":"","examples":[],"children":[]},{"kind":"property","id":"kmacparamscustomization","name":"customization","title":"`kmacParams.customization`","scope":"module","overloadOf":null,"stability":null,"added":["v24.8.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer | undefined","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":47,"end":56}]},"default":null,"description":"The `customization` member represents the optional customization string.","summary":"The `customization` member represents the optional customization string.","examples":[],"children":[]}]},{"kind":"class","id":"class-pbkdf2params","name":"Pbkdf2Params","title":"Class: `Pbkdf2Params`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"pbkdf2paramshash","name":"hash","title":"`pbkdf2Params.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"pbkdf2paramsiterations","name":"iterations","title":"`pbkdf2Params.iterations`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The number of iterations the PBKDF2 algorithm should make when deriving bits.","summary":"The number of iterations the PBKDF2 algorithm should make when deriving bits.","examples":[],"children":[]},{"kind":"property","id":"pbkdf2paramsname","name":"name","title":"`pbkdf2Params.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'PBKDF2'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"pbkdf2paramssalt","name":"salt","title":"`pbkdf2Params.salt`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"Should be at least 16 random or pseudorandom bytes.","summary":"Should be at least 16 random or pseudorandom bytes.","examples":[],"children":[]}]},{"kind":"class","id":"class-rsahashedimportparams","name":"RsaHashedImportParams","title":"Class: `RsaHashedImportParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"rsahashedimportparamshash","name":"hash","title":"`rsaHashedImportParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"rsahashedimportparamsname","name":"name","title":"`rsaHashedImportParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'RSASSA-PKCS1-v1_5'`, `'RSA-PSS'`, or\n`'RSA-OAEP'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-rsahashedkeyalgorithm","name":"RsaHashedKeyAlgorithm","title":"Class: `RsaHashedKeyAlgorithm`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"rsahashedkeyalgorithmhash","name":"hash","title":"`rsaHashedKeyAlgorithm.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"Algorithm","links":[{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":0,"end":9}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeyalgorithmmoduluslength","name":"modulusLength","title":"`rsaHashedKeyAlgorithm.modulusLength`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length in bits of the RSA modulus.","summary":"The length in bits of the RSA modulus.","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeyalgorithmname","name":"name","title":"`rsaHashedKeyAlgorithm.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"","summary":"","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeyalgorithmpublicexponent","name":"publicExponent","title":"`rsaHashedKeyAlgorithm.publicExponent`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"Uint8Array","links":[{"name":"Uint8Array","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","start":0,"end":10}]},"default":null,"description":"The RSA public exponent.","summary":"The RSA public exponent.","examples":[],"children":[]}]},{"kind":"class","id":"class-rsahashedkeygenparams","name":"RsaHashedKeyGenParams","title":"Class: `RsaHashedKeyGenParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"rsahashedkeygenparamshash","name":"hash","title":"`rsaHashedKeyGenParams.hash`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.7.0"],"prUrl":"https://github.com/nodejs/node/pull/59365","commit":null,"description":"SHA-3 algorithms are now supported."}],"type":{"text":"string | Algorithm","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"Algorithm","href":"webcrypto.html#class-algorithm","start":9,"end":18}]},"default":null,"description":"If represented as a {string}, the value must be one of:\n\n* `'SHA-1'`\n* `'SHA-256'`\n* `'SHA-384'`\n* `'SHA-512'`\n* `'SHA3-256'`[^modern-algos]\n* `'SHA3-384'`[^modern-algos]\n* `'SHA3-512'`[^modern-algos]\n\nIf represented as an {Algorithm}, the object's `name` property\nmust be one of the above listed values.","summary":"If represented as a {string}, the value must be one of:","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeygenparamsmoduluslength","name":"modulusLength","title":"`rsaHashedKeyGenParams.modulusLength`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length in bits of the RSA modulus. As a best practice, this should be\nat least `2048`.","summary":"The length in bits of the RSA modulus. As a best practice, this should be at least `2048`.","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeygenparamsname","name":"name","title":"`rsaHashedKeyGenParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be one of `'RSASSA-PKCS1-v1_5'`, `'RSA-PSS'`, or\n`'RSA-OAEP'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"rsahashedkeygenparamspublicexponent","name":"publicExponent","title":"`rsaHashedKeyGenParams.publicExponent`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"Uint8Array","links":[{"name":"Uint8Array","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","start":0,"end":10}]},"default":null,"description":"The RSA public exponent. This must be a {Uint8Array} containing a big-endian,\nunsigned integer that must fit within 32-bits. The {Uint8Array} may contain an\narbitrary number of leading zero-bits. The value must be a prime number. Unless\nthere is reason to use a different value, use `new Uint8Array([1, 0, 1])`\n(65537) as the public exponent.","summary":"The RSA public exponent. This must be a {Uint8Array} containing a big-endian, unsigned integer that must fit within 32-bits. The {Uint8Array} may contain an arbitrary number of leading zero-bits. The value must be a prime number. Unless there is reason to use a different value, use `new Uint8Array([1, 0, 1])` (65537) as the public exponent.","examples":[],"children":[]}]},{"kind":"class","id":"class-rsaoaepparams","name":"RsaOaepParams","title":"Class: `RsaOaepParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"rsaoaepparamslabel","name":"label","title":"`rsaOaepParams.label`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"ArrayBuffer | TypedArray | DataView | Buffer","links":[{"name":"ArrayBuffer","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","start":0,"end":11},{"name":"TypedArray","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray","start":14,"end":24},{"name":"DataView","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/DataView","start":27,"end":35},{"name":"Buffer","href":"buffer.html#class-buffer","start":38,"end":44}]},"default":null,"description":"An additional collection of bytes that will not be encrypted, but will be bound\nto the generated ciphertext.\n\nThe `rsaOaepParams.label` parameter is optional.","summary":"An additional collection of bytes that will not be encrypted, but will be bound to the generated ciphertext.","examples":[],"children":[]},{"kind":"property","id":"rsaoaepparamsname","name":"name","title":"`rsaOaepParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"must be `'RSA-OAEP'`.","summary":"","examples":[],"children":[]}]},{"kind":"class","id":"class-rsapssparams","name":"RsaPssParams","title":"Class: `RsaPssParams`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"rsapssparamsname","name":"name","title":"`rsaPssParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'RSA-PSS'`.","summary":"","examples":[],"children":[]},{"kind":"property","id":"rsapssparamssaltlength","name":"saltLength","title":"`rsaPssParams.saltLength`","scope":"module","overloadOf":null,"stability":null,"added":["v15.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"The length (in bytes) of the random salt to use.","summary":"The length (in bytes) of the random salt to use.","examples":[],"children":[]}]},{"kind":"class","id":"class-turboshakeparams","name":"TurboShakeParams","title":"Class: `TurboShakeParams`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":null,"description":"","summary":"","examples":[],"children":[{"kind":"property","id":"turboshakeparamsdomainseparation","name":"domainSeparation","title":"`turboShakeParams.domainSeparation`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number | undefined","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6},{"name":"undefined","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type","start":9,"end":18}]},"default":null,"description":"The optional domain separation byte (0x01-0x7f). Defaults to `0x1f`.","summary":"The optional domain separation byte (0x01-0x7f). Defaults to `0x1f`.","examples":[],"children":[]},{"kind":"property","id":"turboshakeparamsname","name":"name","title":"`turboShakeParams.name`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"Must be `'TurboSHAKE128'`[^modern-algos] or `'TurboSHAKE256'`[^modern-algos].","summary":"","examples":[],"children":[]},{"kind":"property","id":"turboshakeparamsoutputlength","name":"outputLength","title":"`turboShakeParams.outputLength`","scope":"module","overloadOf":null,"stability":null,"added":["v25.9.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":null,"description":"represents the requested output length in bits.\n\n[^secure-curves]: See [Secure Curves in the Web Cryptography API](#secure-curves-in-the-web-cryptography-api)\n\n[^modern-algos]: See [Modern Algorithms in the Web Cryptography API](#modern-algorithms-in-the-web-cryptography-api)\n\n[^openssl30]: Requires OpenSSL >= 3.0\n\n[^openssl32]: Requires OpenSSL >= 3.2\n\n[^openssl35]: Requires OpenSSL >= 3.5","summary":"","examples":[],"children":[]}]}]}]}