Trait iota_types::crypto::KeypairTraits
pub trait KeypairTraits: Sized + From<Self::PrivKey> + Signer<Self::Sig> + EncodeDecodeBase64 + FromStr {
type PubKey: VerifyingKey<PrivKey = Self::PrivKey, Sig = Self::Sig>;
type PrivKey: SigningKey<PubKey = Self::PubKey, Sig = Self::Sig>;
type Sig: Authenticator<PubKey = Self::PubKey, PrivKey = Self::PrivKey>;
// Required methods
fn public(&self) -> &Self::PubKey;
fn private(self) -> Self::PrivKey;
fn copy(&self) -> Self;
fn generate<R>(rng: &mut R) -> Self
where R: AllowedRng;
}
Expand description
Trait impl’d by a public / private key pair in asymmetric cryptography.
Required Associated Types§
type PubKey: VerifyingKey<PrivKey = Self::PrivKey, Sig = Self::Sig>
type PrivKey: SigningKey<PubKey = Self::PubKey, Sig = Self::Sig>
type Sig: Authenticator<PubKey = Self::PubKey, PrivKey = Self::PrivKey>
Required Methods§
fn copy(&self) -> Self
Object Safety§
This trait is not object safe.