pub trait KeyGenerator: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn generate_keypair(
&self,
) -> Result<KeyPair<SecretVec, Vec<u8>>, CryptoError>;
}Expand description
Key pair generator for asymmetric algorithms.
Required Methods§
Sourcefn generate_keypair(&self) -> Result<KeyPair<SecretVec, Vec<u8>>, CryptoError>
fn generate_keypair(&self) -> Result<KeyPair<SecretVec, Vec<u8>>, CryptoError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".