pub enum DkimPrivateKey {
Ed25519(SigningKey),
OpenSSLRsa(Rsa<Private>),
}Variants§
Implementations§
Source§impl DkimPrivateKey
impl DkimPrivateKey
Sourcepub fn rsa_key(data: &[u8]) -> Result<Self, DKIMError>
pub fn rsa_key(data: &[u8]) -> Result<Self, DKIMError>
Parse RSA key data into a DkimPrivateKey
Sourcepub fn rsa_key_file<P: AsRef<Path>>(path: P) -> Result<Self, DKIMError>
pub fn rsa_key_file<P: AsRef<Path>>(path: P) -> Result<Self, DKIMError>
Load RSA key data from a file and parse it into a DkimPrivateKey
Sourcepub fn ed25519_key(data: &[u8]) -> Result<Self, DKIMError>
pub fn ed25519_key(data: &[u8]) -> Result<Self, DKIMError>
Parse PKCS8 encoded ed25519 key data into a DkimPrivateKey. Both DER and PEM are supported
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DkimPrivateKey
impl RefUnwindSafe for DkimPrivateKey
impl Send for DkimPrivateKey
impl Sync for DkimPrivateKey
impl Unpin for DkimPrivateKey
impl UnwindSafe for DkimPrivateKey
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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