The sign() operation generates a digital signature of the provided data, using the given CryptoKey object.
|algorithm||string or object with a single name string property||The signature algorithm to use. Currently supported: HMAC.|
|key||CryptoKey||The key to use for signing.|
|data||ArrayBuffer, TypedArray, or DataView||The data to be signed.|
A Promise that resolves with the signature as an ArrayBuffer.
|InvalidAccessError||Raised when the signing key either does not support signing operation, or is incompatible with the selected algorithm.|