[#PKCS12_SAFEBAG_create_pkcs8_encrypt_ex] = PKCS12_SAFEBAG_create_pkcs8_encrypt_ex :mrdocs: Create an encrypted pkcs8ShroudedKeyBag safeBag from PKCS#8 private key info. == Synopsis Declared in `<openssl/pkcs12.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:PKCS12_SAFEBAG.adoc[PKCS12_SAFEBAG]* PKCS12_SAFEBAG_create_pkcs8_encrypt_ex( int pbe_nid, char const* pass, int passlen, unsigned char* salt, int saltlen, int iter, xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8_PRIV_KEY_INFO]* p8inf, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* ctx, char const* propq); ---- == Return Value New safeBag, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *pbe_nid* | PBE algorithm NID, or 0 for a default. | *pass* | Passphrase for encryption. | *passlen* | Length of `pass,` or ‐1 to use strlen(). | *salt* | Salt for key derivation, or NULL to generate one. | *saltlen* | Length of `salt` in bytes. | *iter* | Iteration count, or 0 for the default (2048). | *p8inf* | Private key info to encrypt. | *ctx* | Library context for algorithm fetching, or NULL for default. | *propq* | Property query for algorithm fetching, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#