SymmetricCipher

Trait SymmetricCipher 

Source
pub trait SymmetricCipher {
    type Key;

    // Required methods
    fn new(key: &Self::Key) -> Result<Self>
       where Self: Sized;
    fn name() -> &'static str;
}
Expand description

Common trait for all symmetric encryption algorithms

Required Associated Types§

Source

type Key

The key type used by this cipher

Required Methods§

Source

fn new(key: &Self::Key) -> Result<Self>
where Self: Sized,

Creates a new cipher instance with the given key

Source

fn name() -> &'static str

Returns the name of this cipher

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§