Scrypt is a password hashing function specifically designed to resist large-scale brute force attacks using custom hardware.
Compared to bcrypt, scrypt requires a large amount of memory resources, which greatly increases the cost of attacks using ASIC, FPGA, and similar hardware.
Parameter description:
• password: The password to be hashed
• salt: Salt value to enhance security
• N: CPU/memory cost parameter (must be a power of 2)
• r: Block size parameter
• p: Parallelization parameter
• dkLen: Derived key length (bytes)
Recommended settings: N=16384, r=8, p=1, dkLen=32. The hash is one-way and cannot be reversed to retrieve the original password.