Skip to main content

AlgorithmKeyInit

Trait AlgorithmKeyInit 

Source
pub trait AlgorithmKeyInit {
    // Required method
    fn init(&mut self, key: &[u8]);
}

Required Methods§

Source

fn init(&mut self, key: &[u8])

Initializes the algorithm with a key.

This method sets up the internal state of the cipher using the provided key, preparing it for either encryption or decryption.

§Arguments
  • key - A byte slice representing the cryptographic key.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§