Trait async_signature::AsyncSigner [−][src]
pub trait AsyncSigner<S> where
Self: Send + Sync,
S: Signature + Send + 'static, {
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;
}
Expand description
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
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.