pub type PrivateKeyInfoOwned = PrivateKeyInfo<Any, OctetString, BitString>;Expand description
PrivateKeyInfo with Any algorithm parameters, and Box<[u8]> key.
Aliased Type§
pub struct PrivateKeyInfoOwned {
pub algorithm: AlgorithmIdentifier<Any>,
pub private_key: OctetString,
pub public_key: Option<BitString>,
}Fields§
§algorithm: AlgorithmIdentifier<Any>X.509 AlgorithmIdentifier for the private key type.
private_key: OctetStringPrivate key data. Exact content format is different between algorithms.
public_key: Option<BitString>Public key data, optionally available if version is V2.
Trait Implementations§
Source§impl DecodePrivateKey for PrivateKeyInfoOwned
impl DecodePrivateKey for PrivateKeyInfoOwned
Source§fn from_pkcs8_der(bytes: &[u8]) -> Result<Self>
fn from_pkcs8_der(bytes: &[u8]) -> Result<Self>
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format). Read more
Source§fn from_pkcs8_pem(pem: &str) -> Result<Self>
fn from_pkcs8_pem(pem: &str) -> Result<Self>
Deserialize PKCS#8-encoded private key from PEM. Read more
Source§impl EncodePrivateKey for PrivateKeyInfoOwned
impl EncodePrivateKey for PrivateKeyInfoOwned
Source§fn to_pkcs8_der(&self) -> Result<SecretDocument>
fn to_pkcs8_der(&self) -> Result<SecretDocument>
Serialize a
SecretDocument containing a PKCS#8-encoded private key. Read moreSource§fn to_pkcs8_pem(&self, line_ending: LineEnding) -> Result<Zeroizing<String>>
fn to_pkcs8_pem(&self, line_ending: LineEnding) -> Result<Zeroizing<String>>
Serialize this private key as PEM-encoded PKCS#8 with the given
LineEnding. Read moreSource§fn write_pkcs8_der_file(&self, path: impl AsRef<Path>) -> Result<()>
fn write_pkcs8_der_file(&self, path: impl AsRef<Path>) -> Result<()>
Write ASN.1 DER-encoded PKCS#8 private key to the given path. Read more
Source§fn write_pkcs8_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding,
) -> Result<()>
fn write_pkcs8_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<()>
Write ASN.1 PEM-encoded PKCS#8 private key to the given path. Read more
Source§impl OwnedToRef for PrivateKeyInfoOwned
impl OwnedToRef for PrivateKeyInfoOwned
Source§type Borrowed<'a> = PrivateKeyInfo<AnyRef<'a>, &'a OctetStringRef, BitStringRef<'a>>
type Borrowed<'a> = PrivateKeyInfo<AnyRef<'a>, &'a OctetStringRef, BitStringRef<'a>>
The resulting type referencing back to Self
Source§fn owned_to_ref(&self) -> Self::Borrowed<'_>
fn owned_to_ref(&self) -> Self::Borrowed<'_>
Creates a new object referencing back to the self for storage