Creates a new PkDecryption
instance with a newly generated key pair.
Decrypts an encrypted message and returns the raw Uint8Array
.
Decrypts an encrypted message and returns the plaintext as a UTF-8 string.
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 the secret key associated with this PkDecryption
instance.
Static
fromCreates a PkDecryption
instance from a secret key.
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.See
PkEncryption
More details can be found in the official vodozemac documentation.