pub struct SecretKey(/* private fields */);
Expand description
Ed25519 secret key used to create digital signatures over messages.
In public-key cryptography, the system uses a a mathematically related pair of keys: a public key, which is openly distributed, and a secret key, which should remain confidential. For more information, refer to Public-key cryptography.
Ed25519 is a signature system that ensures fast signing and key generation, as well as security and collision resilience.
§Examples
In the example below, the function generates a pair of random public and secret keys.
let (_, secret_key) = exonum_crypto::gen_keypair();
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ToHex for SecretKey
impl ToHex for SecretKey
Source§fn encode_hex<T: FromIterator<char>>(&self) -> T
fn encode_hex<T: FromIterator<char>>(&self) -> T
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)