Skip to main content
webcrypto.SubtleCrypto.sign - Node documentation
method webcrypto.SubtleCrypto.sign

Usage in Deno

import { type webcrypto } from "node:crypto";
SubtleCrypto.sign(): Promise<ArrayBuffer>

Using the method and parameters given by algorithm and the keying material provided by key, subtle.sign() attempts to generate a cryptographic signature of data. If successful, the returned promise is resolved with an <ArrayBuffer> containing the generated signature.

The algorithms currently supported include:

  • 'RSASSA-PKCS1-v1_5'
  • 'RSA-PSS'
  • 'ECDSA'
  • 'Ed25519'
  • 'Ed448'
  • 'HMAC'

Parameters

Return Type

Promise<ArrayBuffer>