Skip to main content

ActiveKeyExchange

Trait ActiveKeyExchange 

Source
pub trait ActiveKeyExchange: Send {
    // Required methods
    fn algorithm(&self) -> KeyExchangeAlgorithm;
    fn public_key(&self) -> &[u8] ;
    fn complete(
        self: Box<Self>,
        peer_public_key: &[u8],
    ) -> Result<SecretVec, CryptoError>;
}
Expand description

Provider-owned one-shot ephemeral key exchange.

Required Methods§

Source

fn algorithm(&self) -> KeyExchangeAlgorithm

Returns the key-exchange algorithm.

Source

fn public_key(&self) -> &[u8]

Returns the encoded wire public key.

Source

fn complete( self: Box<Self>, peer_public_key: &[u8], ) -> Result<SecretVec, CryptoError>

Consumes the private key and derives the shared secret.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§