[#PEM_write_bio_PKCS8PrivateKey_nid] = PEM_write_bio_PKCS8PrivateKey_nid :mrdocs: Write a private key as PEM PKCS#8 using a PKCS#5 v1.5 / PKCS#12 PBE NID. == Synopsis Declared in `<openssl/pem.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PEM_write_bio_PKCS8PrivateKey_nid( xref:BIO.adoc[BIO]* bp, xref:EVP_PKEY.adoc[EVP_PKEY] const* x, int nid, char const* kstr, int klen, xref:pem_password_cb.adoc[pem_password_cb]* cb, void* u); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *bp* | BIO to write to. | *x* | Private key to encode. | *nid* | NID of the PBE algorithm OBJECT IDENTIFIER. | *kstr* | Optional passphrase; if NULL, `cb` is used when encryption requires one. | *klen* | Length of `kstr` when provided. | *cb* | Password callback when a passphrase is needed, or NULL. | *u* | Application data passed to `cb.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#