A private key which can be encoded as a DER object.
fn marshal_to_der(&self) -> Vec<u8>
Marshals a private key in DER format.
marshal_to_der marshal a private key as a DER-encoded structure. The
exact structure encoded depends on the type of key:
Parses a private key in DER format.
parse_from_der parses a private key from a DER-encoded format. The
exact structure expected depends on the type of key:
- For an EC key, it is an ECPrivateKey structure as defined in RFC 5915.
- For an RSA key, it is an RSAPrivateKey structure as defined in RFC 3447.
For Elliptic Curve keys (
EcPrivKey), the curve itself is validated. If
the curve is not known ahead of time, and any curve must be supported at
runtime, use the