PKCS12_key_gen_uni

Derive key material using the PKCS#12 key-generation function (BMPString passphrase).

Synopsis

Declared in <openssl/pkcs12.h>

int
PKCS12_key_gen_uni(
    unsigned char* pass,
    int passlen,
    unsigned char* salt,
    int saltlen,
    int id,
    int iter,
    int n,
    unsigned char* out,
    EVP_MD const* md_type);

Return Value

1 on success, 0 on error.

Parameters

NameDescription
passUnicode passphrase (big-endian UTF-16, not NUL-terminated).
passlenLength of pass in bytes.
saltSalt for derivation.
saltlenLength of salt in bytes.
idPurpose byte (PKCS12_KEY_ID, PKCS12_IV_ID, or PKCS12_MAC_ID).
iterIteration count (values less than 1 are treated as 1).
nNumber of bytes to derive.
outBuffer to receive derived key material.
md_typeMessage digest for the derivation.