pub enum DkimKey {
Rsa(RsaKey<Sha256>),
Ed25519(Ed25519Key),
MlDsa44Ed25519(Box<MlDsa44Ed25519Key>),
}Expand description
A concrete DKIM signing key, holding an RSA, an Ed25519 or an ML-DSA-44/Ed25519 composite key.
Lets a single signer type hold keys of any algorithm.
Dkim2Signer requires it. Every key type
converts into it with From. The composite variant is defined for DKIM2
only; the DKIM and ARC signers reject it.
Variants§
Rsa(RsaKey<Sha256>)
An RSA key producing rsa-sha256 signatures.
Ed25519(Ed25519Key)
An Ed25519 key producing ed25519-sha256 signatures (RFC 8463).
MlDsa44Ed25519(Box<MlDsa44Ed25519Key>)
An ML-DSA-44/Ed25519 composite key producing mldsa44-ed25519-sha512
signatures (DKIM2 only).
Trait Implementations§
Source§impl From<Ed25519Key> for DkimKey
Available on crate features aws-lc-rs or rust-crypto only.
impl From<Ed25519Key> for DkimKey
Available on crate features
aws-lc-rs or rust-crypto only.Source§fn from(key: Ed25519Key) -> Self
fn from(key: Ed25519Key) -> Self
Converts to this type from the input type.
Source§impl From<MlDsa44Ed25519Key> for DkimKey
Available on crate features aws-lc-rs or rust-crypto only.
impl From<MlDsa44Ed25519Key> for DkimKey
Available on crate features
aws-lc-rs or rust-crypto only.Source§fn from(key: MlDsa44Ed25519Key) -> Self
fn from(key: MlDsa44Ed25519Key) -> Self
Converts to this type from the input type.
Source§impl From<RsaKey<Sha256>> for DkimKey
Available on crate features aws-lc-rs or rust-crypto only.
impl From<RsaKey<Sha256>> for DkimKey
Available on crate features
aws-lc-rs or rust-crypto only.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.Source§fn 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. Read moreSource§fn heap_size(&self) -> usize
fn heap_size(&self) -> usize
Approximate heap memory owned by the key, in bytes, for weighing
cache entries that hold it.
Source§fn hash(&self, data: impl Writable) -> HashOutput
fn hash(&self, data: impl Writable) -> HashOutput
Hashes the bytes written by
data with Self::Hasher.Auto Trait Implementations§
impl Freeze for DkimKey
impl RefUnwindSafe for DkimKey
impl Send for DkimKey
impl Sync for DkimKey
impl Unpin for DkimKey
impl UnsafeUnpin for DkimKey
impl UnwindSafe for DkimKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more