[#PKCS12_setup_mac]
= PKCS12&lowbar;setup&lowbar;mac
:mrdocs:

Set MAC parameters in a PKCS&num;12 object without computing the MAC&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS12&lowbar;setup&lowbar;mac(
    xref:PKCS12.adoc[PKCS12]* p12,
    int iter,
    unsigned char* salt,
    int saltlen,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md&lowbar;type);
----

== Return Value

1 on success, 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p12*
| PKCS&num;12 structure to update&period;
| *iter*
| Iteration count for MAC key derivation (1 omits the count from the structure)&period;
| *salt*
| Salt for MAC key derivation, or NULL to generate one&period;
| *saltlen*
| Length of `salt` in bytes&period;
| *md&lowbar;type*
| Message digest for the HMAC&period;
|===


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