Struct olm_rs::pk::OlmPkEncryption [−][src]
pub struct OlmPkEncryption { /* fields omitted */ }Expand description
The encryption part of a PK encrypted channel.
Implementations
Create a new PK encryption object.
Arguments
recipient_key- a public key that will be used for encryption, the public key will be provided by the matching decryption object.
Encrypt a plaintext message.
Returns the encrypted PkMessage.
Arguments
plaintext- A string that will be encrypted using the PkEncryption object.
Panics
InputBufferTooSmallif the ciphertext, ephemeral key, or mac buffers are too small.OutputBufferTooSmallif the random buffer is too small.- on malformed UTF-8 coding of the ciphertext provided by libolm