Class containing SECP256R1 related utility methods.

Constructors

Methods

  • Creates a private key in raw bytes from the given SECP256R1 JWK.

    Parameters

    Returns Uint8Array

  • Signs the provided content using the provided JWK. Signature that is outputted is JWS format, not DER.

    Parameters

    Returns Promise<Uint8Array>

  • Verifies a signature against the provided payload hash and public key.

    Parameters

    • content: Uint8Array
    • signature: Uint8Array

      the signature to verify. Can be in either DER or compact format. If using Oracle Cloud KMS, keys will be DER formatted.

    • publicJwk: PublicJwk

    Returns Promise<boolean>

    a boolean indicating whether the signature is valid.