Generate the HMAC for a PKCS#12 object using configured MAC parameters.
Declared in <openssl/pkcs12.h>
int
PKCS12_gen_mac(
PKCS12* p12,
char const* pass,
int passlen,
unsigned char* mac,
unsigned int* maclen);
1 on success, 0 on error.
| Name | Description |
|---|---|
| p12 | PKCS#12 structure with MAC parameters already set. |
| pass | Passphrase for the HMAC. |
| passlen | Length of pass, or -1 to use strlen(). |
| mac | Buffer to receive the MAC value. |
| maclen | Address to receive MAC length in bytes on input and output. |