Can we please get AsyncVerifier as dual for AsyncSigner
|
/// 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 [`Signer`] trait. |
|
pub trait AsyncSigner<S> { |
|
/// 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. |
|
async fn sign_async(&self, msg: &[u8]) -> Result<S, Error>; |
|
} |
Rationale: Web crypto APIs do not support sync verification so any code that target it needs to come up with own traits to deal with the gap.