Skip to content

Can we have AsyncVerifier please #2287

@Gozala

Description

@Gozala

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions