[−][src]Enum casper_node::crypto::asymmetric_key::SecretKey
A secret or private asymmetric key.
Variants
Ed25519(SecretKey)Ed25519 secret key.
Secp256k1(SecretKey)secp256k1 secret key.
Implementations
impl SecretKey[src]
pub const ED25519_LENGTH: usize[src]
The length in bytes of an Ed25519 secret key.
pub const SECP256K1_LENGTH: usize[src]
The length in bytes of a secp256k1 secret key.
pub fn new_ed25519(bytes: [u8; 32]) -> Self[src]
Constructs a new Ed25519 variant from a byte array.
pub fn new_secp256k1(bytes: [u8; 32]) -> Self[src]
Constructs a new secp256k1 variant from a byte array.
pub fn ed25519_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self>[src]
Constructs a new Ed25519 variant from a byte slice.
pub fn secp256k1_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self>[src]
Constructs a new secp256k1 variant from a byte slice.
pub fn generate_ed25519() -> Self[src]
Constructs a new Ed25519 variant using the operating system's cryptographically secure random number generator.
pub fn generate_secp256k1() -> Self[src]
Constructs a new secp256k1 variant using the operating system's cryptographically secure random number generator.
pub fn as_secret_slice(&self) -> &[u8][src]
Exposes the secret values of the key as a byte slice.
pub fn to_file<P: AsRef<Path>>(&self, file: P) -> Result<()>[src]
Attempts to write the secret key bytes to the configured file path.
pub fn from_file<P: AsRef<Path>>(file: P) -> Result<Self>[src]
Attempts to read the secret key bytes from configured file path.
Trait Implementations
impl Clone for SecretKey[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl DataSize for SecretKey[src]
const IS_DYNAMIC: bool[src]
const STATIC_HEAP_SIZE: usize[src]
fn estimate_heap_size(&self) -> usize[src]
impl Debug for SecretKey[src]
impl<'de> Deserialize<'de> for SecretKey[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>[src]
deserializer: D
) -> StdResult<Self, D::Error>
impl Display for SecretKey[src]
impl<'_> From<&'_ SecretKey> for PublicKey[src]
impl Loadable for SecretKey[src]
type Error = Error
Error that can occur when attempting to load.
fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>[src]
impl Serialize for SecretKey[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T> FromBits<T> for T[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,