PKCS5_v2_PBE_keyivgen

Derive a key and IV from a PKCS#5 v2 PBE AlgorithmIdentifier and initialize ctx.

Synopsis

Declared in <openssl/evp.h>

int
PKCS5_v2_PBE_keyivgen(
    EVP_CIPHER_CTX* ctx,
    char const* pass,
    int passlen,
    ASN1_TYPE* param,
    EVP_CIPHER const* cipher,
    EVP_MD const* md,
    int en_de);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context to initialize for encryption or decryption.
passPassword bytes.
passlenLength of pass, or -1 if pass is a NUL-terminated string.
paramASN.1 parameters from the PBE AlgorithmIdentifier.
cipherCipher suggested by the caller (may be overridden by param).
mdDigest suggested by the caller (may be overridden by param).
en_deNon-zero to encrypt, zero to decrypt.