pub trait Signer {
type Signature: Signature;
// Required methods
fn sign(&self, message: &[u8]) -> Self::Signature;
fn public_key(&self) -> <Self::Signature as Signature>::PublicKey;
}Expand description
A trait for types that can sign messages.
Required Associated Types§
Required Methods§
Sourcefn sign(&self, message: &[u8]) -> Self::Signature
fn sign(&self, message: &[u8]) -> Self::Signature
Signs the given message and returns a signature.
Sourcefn public_key(&self) -> <Self::Signature as Signature>::PublicKey
fn public_key(&self) -> <Self::Signature as Signature>::PublicKey
Returns the public key corresponding to this signer.
Implementors§
Source§impl Signer for Bls12381PrivateKey
Available on crate feature bls only.
impl Signer for Bls12381PrivateKey
Available on crate feature
bls only.Source§impl Signer for Ed25519PrivateKey
Available on crate feature ed25519 only.
impl Signer for Ed25519PrivateKey
Available on crate feature
ed25519 only.type Signature = Ed25519Signature
Source§impl Signer for Secp256k1PrivateKey
Available on crate feature secp256k1 only.
impl Signer for Secp256k1PrivateKey
Available on crate feature
secp256k1 only.Source§impl Signer for Secp256r1PrivateKey
Available on crate feature secp256r1 only.
impl Signer for Secp256r1PrivateKey
Available on crate feature
secp256r1 only.