Crypto
scryptSync
Provides a synchronous variant of scrypt.
This will completely lock up and freeze the UI in a browser and will prevent any event loop from progressing. For this reason, it is preferred to use the async variant.
Parameters
Parameter | Type | Description |
---|---|---|
_passwd | BytesLike | The password to use. |
_salt | BytesLike | The salt to use. |
N | number | The CPU/memory cost parameter. |
r | number | The block size parameter. |
p | number | The parallelization parameter. |
dkLen | number | The length of the key to generate. |
Returns
string
The key derived from the password.