This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// According to the OWASP recommendation, the iteration count should be increased until the hash computation takes around 1 second. | |
// Other recommendations are between 250 and 500 ms. | |
// This procedure is performed, since the short delay is acceptable by the user but it thwarts password attacks (rainbow tables/brute force) effectively. | |
// Run this script on the target system and find the appropriate number of iterations by looking at the execution time. | |
// Requirements: `npm install bcryptjs` | |
const bcrypt = require('bcryptjs'); | |