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 Types§
Required Associated Constants§
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>
Object Safety§
This trait is not object safe.