Skip to main content

AeadEncrypt

Trait AeadEncrypt 

Source
pub trait AeadEncrypt: TryFrom<CipherSuite, Error = SframeError> {
    type Secret;

    // Required method
    fn encrypt<'a, B>(
        &self,
        secret: &Self::Secret,
        buffer: B,
        counter: Counter,
    ) -> Result<()>
       where B: Into<EncryptionBufferView<'a>>;
}
Expand description

Trait for AEAD encryption implementations as defined in RFC 9605 Section 4.4.3.

Required Associated Types§

Source

type Secret

The secret key material this backend consumes, as produced by its KeyDerivation implementation.

Required Methods§

Source

fn encrypt<'a, B>( &self, secret: &Self::Secret, buffer: B, counter: Counter, ) -> Result<()>
where B: Into<EncryptionBufferView<'a>>,

Encrypts the plaintext in the buffer in-place.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§