Struct pkcs8::EncryptedPrivateKeyInfo
source · pub struct EncryptedPrivateKeyInfo<'a> {
pub encryption_algorithm: EncryptionScheme<'a>,
pub encrypted_data: &'a [u8],
}
Available on crate feature
pkcs5
only.Expand description
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§
source§impl<'a> EncryptedPrivateKeyInfo<'a>
impl<'a> EncryptedPrivateKeyInfo<'a>
Trait Implementations§
source§impl<'a> Clone for EncryptedPrivateKeyInfo<'a>
impl<'a> Clone for EncryptedPrivateKeyInfo<'a>
source§fn clone(&self) -> EncryptedPrivateKeyInfo<'a>
fn clone(&self) -> EncryptedPrivateKeyInfo<'a>
Returns a copy 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<'a> Debug for EncryptedPrivateKeyInfo<'a>
impl<'a> Debug for EncryptedPrivateKeyInfo<'a>
source§impl<'a> DecodeValue<'a> for EncryptedPrivateKeyInfo<'a>
impl<'a> DecodeValue<'a> for EncryptedPrivateKeyInfo<'a>
source§fn decode_value<R: Reader<'a>>(
reader: &mut R,
header: Header
) -> Result<EncryptedPrivateKeyInfo<'a>>
fn decode_value<R: Reader<'a>>( reader: &mut R, header: Header ) -> Result<EncryptedPrivateKeyInfo<'a>>
Attempt to decode this message using the provided
Reader
.source§impl EncodeValue for EncryptedPrivateKeyInfo<'_>
impl EncodeValue for EncryptedPrivateKeyInfo<'_>
source§impl<'a> PartialEq<EncryptedPrivateKeyInfo<'a>> for EncryptedPrivateKeyInfo<'a>
impl<'a> PartialEq<EncryptedPrivateKeyInfo<'a>> for EncryptedPrivateKeyInfo<'a>
source§fn eq(&self, other: &EncryptedPrivateKeyInfo<'a>) -> bool
fn eq(&self, other: &EncryptedPrivateKeyInfo<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PemLabel for EncryptedPrivateKeyInfo<'_>
Available on crate feature pem
only.
impl PemLabel for EncryptedPrivateKeyInfo<'_>
Available on crate feature
pem
only.source§impl<'a> TryFrom<&'a [u8]> for EncryptedPrivateKeyInfo<'a>
impl<'a> TryFrom<&'a [u8]> for EncryptedPrivateKeyInfo<'a>
source§impl TryFrom<&EncryptedPrivateKeyInfo<'_>> for SecretDocument
Available on crate feature alloc
only.
impl TryFrom<&EncryptedPrivateKeyInfo<'_>> for SecretDocument
Available on crate feature
alloc
only.source§fn try_from(
encrypted_private_key: &EncryptedPrivateKeyInfo<'_>
) -> Result<SecretDocument>
fn try_from( encrypted_private_key: &EncryptedPrivateKeyInfo<'_> ) -> Result<SecretDocument>
Performs the conversion.
source§impl TryFrom<EncryptedPrivateKeyInfo<'_>> for SecretDocument
Available on crate feature alloc
only.
impl TryFrom<EncryptedPrivateKeyInfo<'_>> for SecretDocument
Available on crate feature
alloc
only.source§fn try_from(
encrypted_private_key: EncryptedPrivateKeyInfo<'_>
) -> Result<SecretDocument>
fn try_from( encrypted_private_key: EncryptedPrivateKeyInfo<'_> ) -> Result<SecretDocument>
Performs the conversion.
impl<'a> Eq for EncryptedPrivateKeyInfo<'a>
impl<'a> Sequence<'a> for EncryptedPrivateKeyInfo<'a>
impl<'a> StructuralEq for EncryptedPrivateKeyInfo<'a>
impl<'a> StructuralPartialEq for EncryptedPrivateKeyInfo<'a>
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§
source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere T: DecodeValue<'a> + FixedTag,
source§impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
impl<T> DecodePem for Twhere T: DecodeOwned + PemLabel,
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.