Encrypt a PKCS#8 private key info structure (default library context).
Synopsis
Declared in <openssl/pkcs12.h>
X509_SIG*
PKCS8_encrypt(
int pbe_nid,
EVP_CIPHER const* cipher,
char const* pass,
int passlen,
unsigned char* salt,
int saltlen,
int iter,
PKCS8_PRIV_KEY_INFO* p8);
Return Value
Encrypted key in an X509_SIG, or NULL on error.
Parameters
Name |
Description |
pbe_nid |
PBE algorithm NID. |
cipher |
Cipher for PBES2, or NULL when |
pass |
Passphrase for encryption. |
passlen |
Length of |
salt |
Salt for key derivation. |
saltlen |
Length of |
iter |
Iteration count for key derivation. |
p8 |
Private key info to encrypt. |
Created with MrDocs