Function ring::pkcs8::unwrap_key_
source ยท pub(crate) fn unwrap_key_<'a>(
alg_id: Input<'_>,
version: Version,
input: Input<'a>,
) -> Result<(Input<'a>, Option<Input<'a>>), KeyRejected>
Expand description
Parses an unencrypted PKCS#8 private key, verifies that it is the right type of key, and returns the key value.
alg_id
must be the encoded value (not including the outermost SEQUENCE
tag and length) of the AlgorithmIdentifier
that identifies the key type.
The result will be an encoded RSAPrivateKey
or ECPrivateKey
or similar.
PKCS#8 is specified in RFC 5958.