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

  • InputBufferTooSmall if the ciphertext, ephemeral key, or mac buffers are too small.
  • OutputBufferTooSmall if the random buffer is too small.
  • on malformed UTF-8 coding of the ciphertext provided by libolm

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.