Skip to main content

Signer

Trait Signer 

Source
pub trait Signer {
    // Required methods
    fn algorithm(&self) -> SignatureAlgorithm;
    fn signer_info(&self) -> SignerInfo;
    fn sign(&self, document_id: &DocumentId) -> Result<Signature>;
}
Available on crate feature signatures only.
Expand description

Trait for signing documents.

Required Methods§

Source

fn algorithm(&self) -> SignatureAlgorithm

Get the signature algorithm used by this signer.

Source

fn signer_info(&self) -> SignerInfo

Get information about the signer.

Source

fn sign(&self, document_id: &DocumentId) -> Result<Signature>

Sign a document ID.

§Errors

Returns an error if signing fails.

Implementors§