[][src]Struct salty::Keypair

pub struct Keypair {
    pub secret: SecretKey,
    pub public: PublicKey,
}

pair of secret and corresponding public keys

Fields

secret: SecretKeypublic: PublicKey

Methods

impl Keypair[src]

pub fn sign(&self, message: &[u8]) -> Signature[src]

pub fn sign_with_context(&self, message: &[u8], context: &[u8]) -> Signature[src]

pub fn sign_prehashed(
    &self,
    prehashed_message: &[u8; 64],
    context: Option<&[u8]>
) -> Signature
[src]

Trait Implementations

impl<'_> From<&'_ [u8; 32]> for Keypair[src]

Auto Trait Implementations

impl Unpin for Keypair

impl Send for Keypair

impl Sync for Keypair

Blanket Implementations

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

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

type Error = !

The type returned in the event of a conversion error.

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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