pub enum EncryptionCodec {
    XChaCha20Poly1305 {
        cipher: XChaCha20Poly1305,
    },
}
Expand description

Represents the codec that encodes & decodes frames by encrypting/decrypting them

Variants

XChaCha20Poly1305

Fields

ChaCha20Poly1305 variant with an extended 192-bit (24-byte) nonce, using [XChaCha20Poly1305] underneath

Implementations

Makes a new EncryptionCodec based on the EncryptionType and key, returning an error if the key is invalid for the encryption type or the type is unknown

Returns the encryption type associa ted with the codec

Size of nonce (in bytes) associated with the encryption algorithm

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Encodes a frame’s item
Decodes a frame’s item
Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.