exportEncryptedPkcs8Der
Export a private key as DER-encoded PBES2-encrypted PKCS#8 EncryptedPrivateKeyInfo.
Uses PBES2 (PKCS#5 v2.1) with AES-CBC and PBKDF2. Compatible with OpenSSL.
ts
function exportEncryptedPkcs8Der(
privateKey: CryptoKey,
options: EncryptedPkcs8Options,
): Promise<Uint8Array>Parameters
privateKey:CryptoKey— The private key to exportoptions:EncryptedPkcs8Options— Encryption options including password and optional algorithm settings
See also
importEncryptedPkcs8Derfor the inverse operationexportEncryptedPkcs8Pemfor PEM output