Trait FromKeyExchange

Source
pub trait FromKeyExchange<Lhs: ?Sized, Rhs: ?Sized>: Sized {
    // Required method
    fn from_key_exchange(lhs: &Lhs, rhs: &Rhs) -> Result<Self, Error>;
}
Expand description

Trait for instantiation from a key exchange

Required Methods§

Source

fn from_key_exchange(lhs: &Lhs, rhs: &Rhs) -> Result<Self, Error>

Derive an instance of this key directly from a supported key exchange

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§

Source§

impl<Lhs, Rhs, T> FromKeyExchange<Lhs, Rhs> for AesKey<T>
where Lhs: KeyExchange<Rhs> + ?Sized, Rhs: ?Sized, T: AesType,

Available on crate feature aes only.
Source§

impl<Lhs, Rhs, T> FromKeyExchange<Lhs, Rhs> for Chacha20Key<T>
where Lhs: KeyExchange<Rhs> + ?Sized, Rhs: ?Sized, T: Chacha20Type,

Available on crate feature chacha only.