Trait MessageSigner

Source
pub trait MessageSigner<A: SignatureAlgorithmType>: Sized {
    // Required method
    async fn sign(
        self,
        algorithm: A::Instance,
        message: &[u8],
    ) -> Result<Vec<u8>, MessageSignatureError>;

    // Provided method
    async fn sign_multi(
        self,
        algorithm: A::Instance,
        messages: &[Vec<u8>],
    ) -> Result<Vec<u8>, MessageSignatureError> { ... }
}

Required Methods§

Source

async fn sign( self, algorithm: A::Instance, message: &[u8], ) -> Result<Vec<u8>, MessageSignatureError>

Provided Methods§

Source

async fn sign_multi( self, algorithm: A::Instance, messages: &[Vec<u8>], ) -> Result<Vec<u8>, MessageSignatureError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A: SignatureAlgorithmType> MessageSigner<A> for JWK

Source§

async fn sign( self, algorithm: A::Instance, message: &[u8], ) -> Result<Vec<u8>, MessageSignatureError>

Source§

async fn sign_multi( self, algorithm: <A as SignatureAlgorithmType>::Instance, messages: &[Vec<u8>], ) -> Result<Vec<u8>, MessageSignatureError>

Implementors§