[][src]Trait async_signature::AsyncSigner

pub trait AsyncSigner<S> where
    Self: Send + Sync,
    S: Signature + Send + 'static, 
{ #[must_use] fn sign_async<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<S, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Asynchronously sign the provided message bytestring using Self (e.g. client for a Cloud KMS or HSM), returning a digital signature.

This trait is an async equivalent of the signature::Signer trait.

Required methods

#[must_use]fn sign_async<'life0, 'life1, 'async_trait>(
    &'life0 self,
    msg: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<S, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

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...

Implementors

impl<S, T> AsyncSigner<S> for T where
    S: Signature + Send + 'static,
    T: Signer<S> + Send + Sync
[src]

Loading content...