encodeRsaPkcs8
fn
ubyte[] encodeRsaPkcs8(RSAPrivateKey key)Encodes an RSA private key in PKCS#8 format (PrivateKeyInfo).
Format: SEQUENCE { INTEGER 0, -- version SEQUENCE { OID rsaEncryption, NULL }, -- algorithmIdentifier OCTET STRING { <PKCS#1 RSAPrivateKey> } -- privateKey }
Parameters
key | The RSA private key to encode. |
Returns
The DER-encoded PKCS#8 PrivateKeyInfo bytes.