pub trait ECDH {
// Required method
fn key_exchange(&self, their_public: &Self) -> Option<Vec<u8>>;
}Expand description
A trait for types that support ECDH key exchange operations.
Required Methods§
Sourcefn key_exchange(&self, their_public: &Self) -> Option<Vec<u8>>
fn key_exchange(&self, their_public: &Self) -> Option<Vec<u8>>
Performs a key exchange operation.
Returns an Option containing the shared secret, or None if the operation fails.
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.