parse_ecc_from_der

Function parse_ecc_from_der 

Source
pub fn parse_ecc_from_der(
    der_bytes: &[u8],
    inherited_oid: Option<&ObjectIdentifier>,
) -> Result<ExternalKey, KeyError>
Expand description

Parses a SEC1 DER-encoded ECC private key.

An optional inherited_oid can be provided, which is necessary when parsing a key from a PKCS#8 wrapper where the curve parameters are in the outer structure.

ยงErrors

Returns a KeyError if the DER data is malformed, the OID is unsupported, or the key is invalid for the specified curve.