pub enum PrivateKeyFormat {
Pkcs8v1,
Pkcs8v2,
Pkcs8v2WithRingBug,
}Expand description
Specifies a private key encoding format
Variants§
Pkcs8v1
PKCS #8 v1: most common version, implemented by for example OpenSSL
Pkcs8v2
PKCS #8 v2: newer format which includes the public key.
§Warning
Many libraries including OpenSSL cannot parse PKCS8 v2 formatting
Pkcs8v2WithRingBug
PKCS #8 v2 emulating a bug that makes it compatible with versions of the ring cryptography library prior to 0.17
§Warning
The only libraries that can parse this format are ring, or libraries (such as this crate) that go out of their way to be compatible with ring’s buggy format.
Trait Implementations§
Source§impl Clone for PrivateKeyFormat
impl Clone for PrivateKeyFormat
Source§fn clone(&self) -> PrivateKeyFormat
fn clone(&self) -> PrivateKeyFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrivateKeyFormat
impl Debug for PrivateKeyFormat
Source§impl PartialEq for PrivateKeyFormat
impl PartialEq for PrivateKeyFormat
impl Copy for PrivateKeyFormat
impl Eq for PrivateKeyFormat
impl StructuralPartialEq for PrivateKeyFormat
Auto Trait Implementations§
impl Freeze for PrivateKeyFormat
impl RefUnwindSafe for PrivateKeyFormat
impl Send for PrivateKeyFormat
impl Sync for PrivateKeyFormat
impl Unpin for PrivateKeyFormat
impl UnwindSafe for PrivateKeyFormat
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