[][src]Struct ed25519_compact::KeyPair

pub struct KeyPair {
    pub pk: PublicKey,
    pub sk: SecretKey,
}

A key pair.

Fields

pk: PublicKey

Public key part of the key pair.

sk: SecretKey

Secret key part of the key pair.

Implementations

impl KeyPair[src]

pub const BYTES: usize[src]

Number of bytes in a key pair.

pub fn from_seed(seed: Seed) -> KeyPair[src]

Generates a new key pair using a secret seed.

pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>[src]

Creates a key pair from a slice.

Trait Implementations

impl Clone for KeyPair[src]

impl Copy for KeyPair[src]

impl Deref for KeyPair[src]

type Target = [u8; 64]

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Returns a key pair as bytes.

Auto Trait Implementations

impl RefUnwindSafe for KeyPair

impl Send for KeyPair

impl Sync for KeyPair

impl Unpin for KeyPair

impl UnwindSafe for KeyPair

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.