EVP_PBE_scrypt_ex

Derive a key from a password using scrypt with an explicit library context.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PBE_scrypt_ex(
    char const* pass,
    size_t passlen,
    unsigned char const* salt,
    size_t saltlen,
    uint64_t N,
    uint64_t r,
    uint64_t p,
    uint64_t maxmem,
    unsigned char* key,
    size_t keylen,
    OSSL_LIB_CTX* ctx,
    char const* propq);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
passPassword bytes, or NULL.
passlenLength of pass in bytes.
saltSalt bytes, or NULL when saltlen is 0.
saltlenLength of salt in bytes.
NCPU/memory cost parameter (must be a power of two greater than 1).
rBlock size parameter.
pParallelization parameter.
maxmemMaximum memory in bytes the derivation may use, or 0 for the default limit.
keyBuffer that receives the derived key.
keylenDesired derived key length in bytes.
ctxLibrary context for provider selection, or NULL for the default.
propqProperty query string, or NULL.