Derive a key from a password using scrypt with an explicit library context.
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);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| pass | Password bytes, or NULL. |
| passlen | Length of pass in bytes. |
| salt | Salt bytes, or NULL when saltlen is 0. |
| saltlen | Length of salt in bytes. |
| N | CPU/memory cost parameter (must be a power of two greater than 1). |
| r | Block size parameter. |
| p | Parallelization parameter. |
| maxmem | Maximum memory in bytes the derivation may use, or 0 for the default limit. |
| key | Buffer that receives the derived key. |
| keylen | Desired derived key length in bytes. |
| ctx | Library context for provider selection, or NULL for the default. |
| propq | Property query string, or NULL. |