A class representing a public-key decryption instance.

This implements the decryption part of the m.megolm_backup.v1.curve25519-aes-sha2 algorithm described in the Matrix spec.

PkEncryption

More details can be found in the official vodozemac documentation.

Constructors

  • Creates a new PkDecryption instance with a newly generated key pair.

    Returns PkDecryption

Methods

  • Decrypts an encrypted message and returns the raw Uint8Array.

    Parameters

    Returns Uint8Array

  • Decrypts an encrypted message and returns the plaintext as a UTF-8 string.

    Parameters

    Returns string

  • Returns void

  • Returns the public key associated with this decryption instance.

    This can be used to construct a PkEncryption object to encrypt a message for this PkDecryption object.

    Returns Curve25519PublicKey