Returns an object that can sign data using the specified algorithm and a Key object.
Syntaxvar retVal = SubtleCrypto.sign(algorithm, key, buffer);
- algorithm [in]
An object specifying the cryptographic signature or message authentication algorithm to use (along with any required algorithmic parameters).
- key [in]
The signing or message authentication key.
- buffer [in, optional]
The data to be signed via the key specified by the key parameter. If this parameter is specified, the returned operation will immediately complete and return the signature. 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 (sign) 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 signature returned.
An Promise object that will sign data using the specified algorithm with the supplied key.
The sign method supports the following cryptographic algorithms: