[#PKCS12_set_mac] = PKCS12_set_mac :mrdocs: Compute and store the MAC and MAC parameters in a PKCS#12 object. == Synopsis Declared in `<openssl/pkcs12.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS12_set_mac( xref:PKCS12.adoc[PKCS12]* p12, char const* pass, int passlen, unsigned char* salt, int saltlen, int iter, xref:EVP_MD.adoc[EVP_MD] const* md_type); ---- == Return Value 1 on success, 0 on error. == Parameters [cols="1,4"] |=== | Name| Description | *p12* | PKCS#12 structure to update. | *pass* | Passphrase for the HMAC. | *passlen* | Length of `pass,` or ‐1 to use strlen(). | *salt* | Salt for MAC key derivation, or NULL to generate one. | *saltlen* | Length of `salt` in bytes. | *iter* | Iteration count for MAC key derivation (1 omits the count from the structure). | *md_type* | Message digest for the HMAC. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#