Struct pkcs8::EncryptedPrivateKeyInfo [−][src]
This is supported on crate feature
pkcs5
only.PKCS#8 EncryptedPrivateKeyInfo
.
ASN.1 structure containing a PKCS#5 EncryptionScheme
identifier for a
password-based symmetric encryption scheme and encrypted private key data.
Schema
Structure described in RFC 5208 Section 6:
EncryptedPrivateKeyInfo ::= SEQUENCE {
encryptionAlgorithm EncryptionAlgorithmIdentifier,
encryptedData EncryptedData }
EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
EncryptedData ::= OCTET STRING
Fields
encryption_algorithm: EncryptionScheme<'a>
Algorithm identifier describing a password-based symmetric encryption
scheme used to encrypt the encrypted_data
field.
encrypted_data: &'a [u8]
Private key data
Implementations
impl<'a> EncryptedPrivateKeyInfo<'a>
[src]
pub fn decrypt(&self, password: impl AsRef<[u8]>) -> Result<PrivateKeyDocument>
[src]
This is supported on crate feature
encryption
only.Attempt to decrypt this encrypted private key using the provided password to derive an encryption key.
pub fn to_der(&self) -> EncryptedPrivateKeyDocument
[src]
This is supported on crate feature
alloc
only.Encode this EncryptedPrivateKeyInfo
as ASN.1 DER.
pub fn to_pem(&self) -> Zeroizing<String>
[src]
This is supported on crate feature
pem
only.Encode this EncryptedPrivateKeyInfo
as PEM-encoded ASN.1 DER.
Trait Implementations
impl<'a> Clone for EncryptedPrivateKeyInfo<'a>
[src]
fn clone(&self) -> EncryptedPrivateKeyInfo<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for EncryptedPrivateKeyInfo<'a>
[src]
impl<'a> Eq for EncryptedPrivateKeyInfo<'a>
[src]
impl From<&'_ EncryptedPrivateKeyInfo<'_>> for EncryptedPrivateKeyDocument
[src]
fn from(key: &EncryptedPrivateKeyInfo<'_>) -> EncryptedPrivateKeyDocument
[src]
impl From<EncryptedPrivateKeyInfo<'_>> for EncryptedPrivateKeyDocument
[src]
fn from(key: EncryptedPrivateKeyInfo<'_>) -> EncryptedPrivateKeyDocument
[src]
impl<'a> Message<'a> for EncryptedPrivateKeyInfo<'a>
[src]
impl<'a> PartialEq<EncryptedPrivateKeyInfo<'a>> for EncryptedPrivateKeyInfo<'a>
[src]
fn eq(&self, other: &EncryptedPrivateKeyInfo<'a>) -> bool
[src]
fn ne(&self, other: &EncryptedPrivateKeyInfo<'a>) -> bool
[src]
impl<'a> StructuralEq for EncryptedPrivateKeyInfo<'a>
[src]
impl<'a> StructuralPartialEq for EncryptedPrivateKeyInfo<'a>
[src]
impl<'a> TryFrom<&'a [u8]> for EncryptedPrivateKeyInfo<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(bytes: &'a [u8]) -> Result<Self>
[src]
impl<'a> TryFrom<Any<'a>> for EncryptedPrivateKeyInfo<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for EncryptedPrivateKeyInfo<'a>
impl<'a> Send for EncryptedPrivateKeyInfo<'a>
impl<'a> Sync for EncryptedPrivateKeyInfo<'a>
impl<'a> Unpin for EncryptedPrivateKeyInfo<'a>
impl<'a> UnwindSafe for EncryptedPrivateKeyInfo<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Choice<'a> for T where
T: Decodable<'a> + Encodable + Tagged,
[src]
T: Decodable<'a> + Encodable + Tagged,
pub fn can_decode(tag: Tag) -> bool
[src]
impl<'a, T> Decodable<'a> for T where
T: TryFrom<Any<'a>, Error = Error>,
[src]
T: TryFrom<Any<'a>, Error = Error>,
pub fn decode(decoder: &mut Decoder<'a>) -> Result<T, Error>
[src]
pub fn from_der(bytes: &'a [u8]) -> Result<Self, Error>
[src]
impl<'a, M> Encodable for M where
M: Message<'a>,
[src]
M: Message<'a>,
pub fn encoded_len(&self) -> Result<Length, Error>
[src]
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<(), Error>
[src]
pub fn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
[src]
pub fn encode_to_vec(&self, buf: &mut Vec<u8, Global>) -> Result<Length, Error>
[src]
pub fn to_vec(&self) -> Result<Vec<u8, Global>, Error>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<'a, M> Tagged for M where
M: Message<'a>,
[src]
M: Message<'a>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,