decodeRsaPkcs8

fnRSAPrivateKey decodeRsaPkcs8(const(ubyte)[] der)

Decodes an RSA private key from PKCS#8 format (PrivateKeyInfo).

Parameters

derThe DER-encoded PKCS#8 PrivateKeyInfo bytes.

Returns

The decoded RSA private key.

Throws

CryptoException if the DER is malformed or algorithm is not RSA.