MultipleEncryptCipher

Trait MultipleEncryptCipher 

Source
pub trait MultipleEncryptCipher: CoseEncryptCipher {
    // Required method
    fn generate_cek<RNG: RngCore + CryptoRng>(rng: &mut RNG) -> CoseKey;
}
Expand description

Intended for ciphers which can encrypt for multiple recipients. For this purpose, a method must be provided which generates the Content Encryption Key.

If these recipients each use different key types, you can use an enum to represent them.

Required Methods§

Source

fn generate_cek<RNG: RngCore + CryptoRng>(rng: &mut RNG) -> CoseKey

Randomly generates a new Content Encryption Key (CEK) using the given rng. The content of the CoseEncrypt will then be encrypted with the key, while each recipient will be encrypted with a corresponding Key Encryption Key (KEK) provided by the caller of encrypt_access_token_multiple.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§