EVP_PBE_KEYGEN

Callback type that derives a key/IV from a password and initializes a cipher context for PBE.

Synopsis

Declared in <openssl/evp.h>

typedef int EVP_PBE_KEYGEN(EVP_CIPHER_CTX*, char const*, int, ASN1_TYPE*, EVP_CIPHER const*, EVP_MD const*, int);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context to initialize for encryption or decryption.
passPassword bytes (not necessarily NUL-terminated).
passlenLength of pass in bytes, or -1 if pass is NUL-terminated.
paramAlgorithm-specific ASN.1 parameters (for example a salt and iteration count).
cipherCipher algorithm to use.
mdDigest used in the PBE key-derivation function.
en_de1 to encrypt, 0 to decrypt.