Trait chain_crypto::key::AsymmetricKey
source · 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>;
}