[#PEM_do_header]
= PEM&lowbar;do&lowbar;header
:mrdocs:

Decrypt PEM payload bytes in place using cipher info and a password callback&period;

== Synopsis

Declared in `&lt;openssl&sol;pem&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PEM&lowbar;do&lowbar;header(
    xref:EVP_CIPHER_INFO.adoc[EVP&lowbar;CIPHER&lowbar;INFO]* cipher,
    unsigned char* data,
    long* len,
    xref:pem_password_cb.adoc[pem&lowbar;password&lowbar;cb]* callback,
    void* u);
----

== Description

Deprecated&colon; prefer PKCS&num;8 with PKCS&num;5 v2&period;0 PBE for new private&hyphen;key storage&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cipher*
| Cipher and IV previously filled by PEM&lowbar;get&lowbar;EVP&lowbar;CIPHER&lowbar;INFO()&period;
| *data*
| Encoded payload buffer&semi; decrypted octets overwrite the same buffer&period;
| *len*
| On input, length of `data&semi;` on output, length of the decrypted payload&period;
| *callback*
| Password callback used when `cipher` indicates encryption&semi; may be NULL&period;
| *u*
| Application pointer forwarded to `callback&period;`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
