pub trait SigningKey {
type Hasher: HashImpl;
// Required methods
fn sign(&self, input: impl Writable) -> Result<Vec<u8>>;
fn algorithm(&self) -> Algorithm;
// Provided methods
fn hash(&self, data: impl Writable) -> HashOutput { ... }
fn heap_size(&self) -> usize { ... }
}Expand description
A private key that can produce DKIM, ARC and DKIM2 signatures.
Implemented by RsaKey<Sha256>, Ed25519Key,
MlDsa44Ed25519Key and DkimKey. Signers such as
DkimSigner are generic over this trait.
Required Associated Types§
Required Methods§
Sourcefn sign(&self, input: impl Writable) -> Result<Vec<u8>>
fn sign(&self, input: impl Writable) -> Result<Vec<u8>>
Signs the bytes written by input and returns the raw signature.
§Errors
Returns Error::Crypto with
CryptoError::Library if the backend fails to sign.
Provided Methods§
Sourcefn hash(&self, data: impl Writable) -> HashOutput
fn hash(&self, data: impl Writable) -> HashOutput
Hashes the bytes written by data with Self::Hasher.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl SigningKey for DkimKey
Available on crate features aws-lc-rs or rust-crypto only.
impl SigningKey for DkimKey
Available on crate features
aws-lc-rs or rust-crypto only.