Class PrivateKey

Represents a private key with associated public key and cryptographic algorithm. Provides methods for signing messages, exporting to PEM, and generating public keys.

Hierarchy

  • PrivateKey

Constructors

Properties

The cryptographic algorithm used for the key.

The internal private key implementation.

The public key associated with this private key.

Accessors

Methods

  • Signs a message without including the algorithm byte.

    Returns

    A promise resolving to the raw signature bytes.

    Parameters

    • msg: Uint8Array

      The message to sign.

    Returns Promise<Uint8Array>

  • Signs a message using the private key.

    Returns

    A promise resolving to the signature bytes.

    Parameters

    • msg: Uint8Array

      The message to sign.

    Returns Uint8Array

  • Signs a message using the private key and includes the algorithm byte in the signature.

    Returns

    A promise resolving to the signature bytes with the algorithm byte.

    Parameters

    • msg: Uint8Array

      The message to sign.

    Returns Uint8Array

Generated using TypeDoc