Enum casper_types::crypto::SecretKey
source · #[non_exhaustive]pub enum SecretKey {
System,
Ed25519(SigningKey),
Secp256k1(SigningKey),
}Expand description
A secret or private asymmetric key.
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.
System
System secret key.
Ed25519(SigningKey)
Ed25519 secret key.
Secp256k1(SigningKey)
secp256k1 secret key.
Implementations§
source§impl SecretKey
impl SecretKey
sourcepub const SYSTEM_LENGTH: usize = 0usize
pub const SYSTEM_LENGTH: usize = 0usize
The length in bytes of a system secret key.
sourcepub const ED25519_LENGTH: usize = 32usize
pub const ED25519_LENGTH: usize = 32usize
The length in bytes of an Ed25519 secret key.
sourcepub const SECP256K1_LENGTH: usize = 32usize
pub const SECP256K1_LENGTH: usize = 32usize
The length in bytes of a secp256k1 secret key.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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