sign method

JSPromise<JSAny?> sign(
  1. AlgorithmIdentifier algorithm,
  2. CryptoKey key,
  3. BufferSource data
)

The sign() method of the SubtleCrypto interface generates a digital .

It takes as its arguments a to sign with, some algorithm-specific parameters, and the data to sign. It returns a Promise which will be fulfilled with the signature.

You can use the corresponding SubtleCrypto.verify method to verify the signature.

Implementation

external JSPromise<JSAny?> sign(
  AlgorithmIdentifier algorithm,
  CryptoKey key,
  BufferSource data,
);