pub trait AsymmetricKey {
type PubAlg: AsymmetricPublicKey;
type Secret: AsRef<[u8]> + Clone;
const SECRET_BECH32_HRP: &'static str;
// Required methods
fn generate<T: RngCore + CryptoRng>(rng: T) -> Self::Secret;
fn compute_public(
secret: &Self::Secret,
) -> <Self::PubAlg as AsymmetricPublicKey>::Public;
fn secret_from_binary(data: &[u8]) -> Result<Self::Secret, SecretKeyError>;
}
Required Associated Constants§
const SECRET_BECH32_HRP: &'static str
Required Associated Types§
Required Methods§
fn generate<T: RngCore + CryptoRng>(rng: T) -> Self::Secret
fn compute_public( secret: &Self::Secret, ) -> <Self::PubAlg as AsymmetricPublicKey>::Public
fn secret_from_binary(data: &[u8]) -> Result<Self::Secret, SecretKeyError>
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.