[][src]Struct keynesis::key::ed25519_hd::SecretKey

pub struct SecretKey { /* fields omitted */ }

Implementations

impl SecretKey[src]

pub const SIZE: usize[src]

pub fn new<Rng>(rng: &mut Rng) -> Self where
    Rng: RngCore + CryptoRng
[src]

generate a new SecretKey with the given random number generator

pub fn is_3rd_highest_bit_clear(&self) -> bool[src]

pub fn public_key(&self) -> PublicKey[src]

get the PublicKey associated to this key

Unlike the SecretKey, the PublicKey can be safely publicly shared. The key can then be used to verify any Signature generated with this SecretKey and the original message.

pub fn chain(&self) -> &ChainCode[src]

pub fn key(&self) -> &SecretKey[src]

pub fn into_key(self) -> SecretKey[src]

pub fn leak_to_hex(&self) -> String[src]

pub fn exchange(&self, public_key: &PublicKey) -> SharedSecret[src]

generate a shared secret between the owner of the given public key and ourselves.

pub fn sign<T: AsRef<[u8]>>(&self, msg: T) -> Signature[src]

create a Signature for the given message with this SecretKey.

The Signature can then be verified against the associated PublicKey and the original message.

pub fn derive<P>(&self, path: P) -> Self where
    P: AsRef<[u8]>, 
[src]

Trait Implementations

impl Clone for SecretKey[src]

impl Debug for SecretKey[src]

impl Eq for SecretKey[src]

impl FromStr for SecretKey[src]

type Err = SecretKeyError

The associated error which can be returned from parsing.

impl Hash for SecretKey[src]

impl PartialEq<SecretKey> for SecretKey[src]

impl StructuralEq for SecretKey[src]

impl StructuralPartialEq for SecretKey[src]

impl<'a> TryFrom<&'a [u8]> for SecretKey[src]

type Error = SecretKeyError

The type returned in the event of a conversion error.

impl TryFrom<[u8; 96]> for SecretKey[src]

type Error = SecretKeyError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,