pub struct SigningKey(/* private fields */);Expand description
Private Ed25519 key used for digital signatures.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate() -> Self
pub fn generate() -> Self
Generates a new signing key using the system’s random number generator (CSPRNG) as a seed.
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a SigningKey from its raw bytes representation.
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Returns public key using this signing counterpart.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for SigningKey
Available on crate feature arbitrary only.
impl<'a> Arbitrary<'a> for SigningKey
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SigningKey
Available on crate features test_utils only.
impl Debug for SigningKey
Available on crate features
test_utils only.Source§impl Default for SigningKey
impl Default for SigningKey
Source§impl<'de> Deserialize<'de> for SigningKey
impl<'de> Deserialize<'de> for SigningKey
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 Display for SigningKey
impl Display for SigningKey
Source§impl From<SigningKey> for [u8; 32]
impl From<SigningKey> for [u8; 32]
Source§fn from(value: SigningKey) -> Self
fn from(value: SigningKey) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SigningKey
impl PartialEq for SigningKey
Source§fn eq(&self, other: &SigningKey) -> bool
fn eq(&self, other: &SigningKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SigningKey
impl Serialize for SigningKey
Source§impl TryFrom<&[u8]> for SigningKey
impl TryFrom<&[u8]> for SigningKey
impl Eq for SigningKey
impl StructuralPartialEq for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
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