#[non_exhaustive]pub enum KeyPairEnum {
Ed25519(Ed25519KeyPair),
Bip32Ed25519(KeyPair),
}Expand description
Store a cryptographic key pair.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ed25519(Ed25519KeyPair)
Store a ed25519 key pair.
Bip32Ed25519(KeyPair)
Store a BIP32-ed25519 key pair.
Trait Implementations§
Source§impl Clone for KeyPairEnum
impl Clone for KeyPairEnum
Source§fn clone(&self) -> KeyPairEnum
fn clone(&self) -> KeyPairEnum
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyPairEnum
impl Debug for KeyPairEnum
Source§impl Display for KeyPairEnum
impl Display for KeyPairEnum
Source§impl GetKeysAlgo for KeyPairEnum
impl GetKeysAlgo for KeyPairEnum
Source§impl KeyPair for KeyPairEnum
impl KeyPair for KeyPairEnum
Source§type Signator = SignatorEnum
type Signator = SignatorEnum
Signator type of associated cryptosystem.
Source§fn generate_signator(&self) -> Self::Signator
fn generate_signator(&self) -> Self::Signator
Generate signator.
Source§fn verify(&self, message: &[u8], signature: &Sig) -> Result<(), SigError>
fn verify(&self, message: &[u8], signature: &Sig) -> Result<(), SigError>
Verify a signature with public key.
Source§fn upcast(self) -> KeyPairEnum
fn upcast(self) -> KeyPairEnum
Upcast to KeyPairEnum
Source§impl PartialEq for KeyPairEnum
impl PartialEq for KeyPairEnum
impl Eq for KeyPairEnum
impl StructuralPartialEq for KeyPairEnum
Auto Trait Implementations§
impl Freeze for KeyPairEnum
impl RefUnwindSafe for KeyPairEnum
impl Send for KeyPairEnum
impl Sync for KeyPairEnum
impl Unpin for KeyPairEnum
impl UnwindSafe for KeyPairEnum
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more