Trait signature::SignerMut

source ·
pub trait SignerMut<S> {
    // Required method
    fn try_sign(&mut self, msg: &[u8]) -> Result<S, Error>;

    // Provided method
    fn sign(&mut self, msg: &[u8]) -> S { ... }
}
Expand description

Sign the provided message bytestring using &mut Self (e.g. an evolving cryptographic key such as a stateful hash-based signature), returning a digital signature.

Required Methods§

source

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

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

Signing can fail, e.g., if the number of time periods allowed by the current key is exceeded.

Provided Methods§

source

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

Sign the given message, update the state, and return a digital signature.

Implementors§

source§

impl<S, T: Signer<S>> SignerMut<S> for T

Blanket impl of SignerMut for all Signer types.