Decrypts buffer's data using the algorithm and key parameters.
Syntaxvar retVal = SubtleCrypto.decrypt(algorithm, key, buffer);
- algorithm [in]
A valid algorithm object.
- key [in]
A valid Key object.
- buffer [in, optional]
An ArrayBufferView object containing the data to decrypt. If this parameter is specified, the returned operation will immediately complete and return with the decrypted data. Otherwise, the caller is expected to perform the following tasks:
- Provide data through any number of calls to the process method of the CryptoOperation object returned by this (decrypt) method.
- Call the finish method (on this same CryptoOperation object) when done entering data via the process method.
Once the above two steps are completed, the operation will be completed and the decrypted data returned.
A Promise object that will decrypt data using the specified algorithm with the supplied key.
The decrypt method supports the following cryptographic algorithms:
For an example, see encrypt.