[][src]Trait ed25519_dalek::Signer

pub trait Signer<S> where
    S: Signature
{ fn try_sign(&self, msg: &[u8]) -> Result<S, Error>; fn sign(&self, msg: &[u8]) -> S { ... } }

Sign the provided message bytestring using Self (e.g. a cryptographic key or connection to an HSM), returning a digital signature.

Required methods

fn try_sign(&self, msg: &[u8]) -> Result<S, Error>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong.

The main intended use case for signing errors is when communicating with external signers, e.g. cloud KMS, HSMs, or other hardware tokens.

Loading content...

Provided methods

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature

Loading content...


impl Signer<Signature> for Keypair[src]

fn try_sign(&self, message: &[u8]) -> Result<Signature, SignatureError>[src]

Sign a message with this keypair's secret key.

Loading content...