diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 4bc9bddc290ecd..d00cf057f68e7a 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -790,9 +790,9 @@ added: REPLACEME -* `operation` {string} "encrypt", "decrypt", "sign", "verify", "digest", "generateKey", "deriveKey", "deriveBits", "importKey", "exportKey", "getPublicKey", "wrapKey", or "unwrapKey" +* `operation` {string} "encrypt", "decrypt", "sign", "verify", "digest", "generateKey", "deriveKey", "deriveBits", "importKey", "exportKey", "getPublicKey", "wrapKey", "unwrapKey", "encapsulateBits", "encapsulateKey", "decapsulateBits", or "decapsulateKey" * `algorithm` {string|Algorithm} -* `lengthOrAdditionalAlgorithm` {null|number|string|Algorithm|undefined} 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", or the algorithm of key to be imported after unwrapping when operation is "unwrapKey". **Default:** `null` when operation is "deriveBits", `undefined` otherwise. +* `lengthOrAdditionalAlgorithm` {null|number|string|Algorithm|undefined} 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. * Returns: {boolean} Indicating whether the implementation supports the given operation @@ -801,6 +801,8 @@ 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. +See [Checking for runtime algorithm support][] for an example use of this method. + ### `subtle.decapsulateBits(decapsulationAlgorithm, decapsulationKey, ciphertext)` +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. + #### `encapsulatedBits.ciphertext` +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. + #### `encapsulatedKey.ciphertext`