A class representing a public-key encryption instance.

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

PkDecryption

More details can be found in the official vodozemac documentation.

Methods

  • Encrypts a byte message and returns an encrypted PkMessage.

    Parameters

    • message: Uint8Array

    Returns PkMessage

  • Encrypts a string message and returns an encrypted PkMessage.

    Parameters

    • message: string

    Returns PkMessage

  • Returns void