pub trait KeyGenerator:
Send
+ Sync
+ MaybeDebug {
// 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.
When the debug Cargo feature is enabled this trait gains Debug as a
supertrait, enabling Box<dyn KeyGenerator> to be formatted with {:?}.
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".