Derive a key with scrypt from a password and salt.
Declared in <openssl/evp.h>
int
EVP_PBE_scrypt(
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);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| pass | Password bytes (may be NULL when passlen is 0). |
| passlen | Length of pass in bytes. |
| salt | Salt octets. |
| saltlen | Length of salt in bytes. |
| N | CPU/memory cost parameter (power of two). |
| r | Block size parameter. |
| p | Parallelization parameter. |
| maxmem | Memory limit in bytes (0 selects the library default). |
| key | Output buffer for the derived key. |
| keylen | Desired derived-key length in bytes. |