PKCS5_pbe_set0_algor_ex

Set a PBES1 AlgorithmIdentifier (OID, iteration count, and salt) with a library context.

Synopsis

Declared in <openssl/x509.h>

int
PKCS5_pbe_set0_algor_ex(
    X509_ALGOR* algor,
    int alg,
    int iter,
    unsigned char const* salt,
    int saltlen,
    OSSL_LIB_CTX* libctx);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
algorDestination AlgorithmIdentifier updated in place.
algPBE algorithm NID.
iterIteration count for key derivation.
saltSalt octets, or NULL to generate a random salt of length saltlen (or a default when saltlen is 0).
saltlenLength of salt in bytes, or the length of salt to generate when salt is NULL.
libctxLibrary context for random salt generation, or NULL for the default.