Trait cylinder::Signer

source ·
pub trait Signer: Send {
    // Required methods
    fn algorithm_name(&self) -> &str;
    fn sign(&self, message: &[u8]) -> Result<Signature, SigningError>;
    fn public_key(&self) -> Result<PublicKey, SigningError>;
    fn clone_box(&self) -> Box<dyn Signer>;
}
Expand description

A signer for arbitrary messages

Required Methods§

source

fn algorithm_name(&self) -> &str

Return the algorithm name used for signing.

source

fn sign(&self, message: &[u8]) -> Result<Signature, SigningError>

Signs the given message

source

fn public_key(&self) -> Result<PublicKey, SigningError>

Returns the signer’s public key

source

fn clone_box(&self) -> Box<dyn Signer>

Clone implementation for Signer. The implementation of the Clone trait for Box<dyn Signer> calls this method.

Trait Implementations§

source§

impl Clone for Box<dyn Signer>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§