Derive key material using the PKCS#12 key-generation function (ASCII passphrase).
Declared in <openssl/pkcs12.h>
int
PKCS12_key_gen_asc(
char const* pass,
int passlen,
unsigned char* salt,
int saltlen,
int id,
int iter,
int n,
unsigned char* out,
EVP_MD const* md_type);
1 on success, 0 on error.
| Name | Description |
|---|---|
| pass | ASCII passphrase. |
| passlen | Length of pass, or -1 to use strlen(). |
| salt | Salt for derivation. |
| saltlen | Length of salt in bytes. |
| id | Purpose byte (PKCS12_KEY_ID, PKCS12_IV_ID, or PKCS12_MAC_ID). |
| iter | Iteration count (values less than 1 are treated as 1). |
| n | Number of bytes to derive. |
| out | Buffer to receive derived key material. |
| md_type | Message digest for the derivation. |