[−][src]Struct picky_asn1_x509::private_key_info::PrivateKeyInfo
Public-Key Cryptography Standards (PKCS) #8
Section 5
Private-key information shall have ASN.1 type PrivateKeyInfo:
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL }
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
The fields of type PrivateKeyInfo have the following meanings:
version
is the syntax version number, for compatibility with
future revisions of this document. It shall be 0 for this version
of the document.
privateKeyAlgorithm
identifies the private-key algorithm. One
example of a private-key algorithm is PKCS #1's rsaEncryption.
privateKey
is an octet string whose contents are the value of the
private key. The interpretation of the contents is defined in the
registration of the private-key algorithm. For an RSA private
key, for example, the contents are a BER encoding of a value of
type RSAPrivateKey.
attributes
is a set of attributes. These are the extended
information that is encrypted along with the private-key
information.
Fields
version: u8
private_key_algorithm: AlgorithmIdentifier
private_key: PrivateKeyValue
Implementations
impl PrivateKeyInfo
[src]
pub fn new_rsa_encryption(
modulus: IntegerAsn1,
public_exponent: IntegerAsn1,
private_exponent: IntegerAsn1,
primes: (IntegerAsn1, IntegerAsn1),
exponents: (IntegerAsn1, IntegerAsn1),
coefficient: IntegerAsn1
) -> Self
[src]
modulus: IntegerAsn1,
public_exponent: IntegerAsn1,
private_exponent: IntegerAsn1,
primes: (IntegerAsn1, IntegerAsn1),
exponents: (IntegerAsn1, IntegerAsn1),
coefficient: IntegerAsn1
) -> Self
Trait Implementations
impl Clone for PrivateKeyInfo
[src]
pub fn clone(&self) -> PrivateKeyInfo
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PrivateKeyInfo
[src]
impl<'de> Deserialize<'de> for PrivateKeyInfo
[src]
pub fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl PartialEq<PrivateKeyInfo> for PrivateKeyInfo
[src]
pub fn eq(&self, other: &PrivateKeyInfo) -> bool
[src]
pub fn ne(&self, other: &PrivateKeyInfo) -> bool
[src]
impl Serialize for PrivateKeyInfo
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for PrivateKeyInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for PrivateKeyInfo
impl Send for PrivateKeyInfo
impl Sync for PrivateKeyInfo
impl Unpin for PrivateKeyInfo
impl UnwindSafe for PrivateKeyInfo
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<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,