pub trait Signer {
type Signature: Signature;
type Error;
// Required method
fn sign(&self, bytes: &[u8]) -> Result<Self::Signature, Self::Error>;
}
Expand description
A type which can sign a byte buffer.
In some cases, the trait is directly implemented on a signing key type which can directly generate a signature.
In other cases, a new type composed of multiple fields may be needed because the signing key’s sign method may require more parameters (e.g. a random number generator).
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
source§impl Signer for SigningKey<Sha256>
Available on crate feature rsa
only.
impl Signer for SigningKey<Sha256>
Available on crate feature
rsa
only.source§impl Signer for SigningKey
Available on crate feature p256
only.
impl Signer for SigningKey
Available on crate feature
p256
only.Implementors§
source§impl<K, A> Signer for HmacKeySigner<K, A>
Available on crate feature ring
only.
impl<K, A> Signer for HmacKeySigner<K, A>
Available on crate feature
ring
only.source§impl<K, R, A> Signer for EcdsaKeyPairSigner<K, R, A>
Available on crate feature ring
only.
impl<K, R, A> Signer for EcdsaKeyPairSigner<K, R, A>
Available on crate feature
ring
only.