Created
November 15, 2019 01:02
-
-
Save maxchehab/f23d364f3c5494d3557f86a964fcd9f4 to your computer and use it in GitHub Desktop.
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
import bcrypt from 'bcrypt'; | |
console.time('1 salt round'); | |
bcrypt.hashSync('hello world', 1); | |
console.timeEnd('1 salt round'); | |
console.time('10 salt round'); | |
bcrypt.hashSync('hello world', 10); | |
console.timeEnd('10 salt round'); | |
console.time('13 salt round'); | |
bcrypt.hashSync('hello world', 13); | |
console.timeEnd('13 salt round'); | |
// Results: | |
// 1 salt round: 1.866ms | |
// 10 salt round: 60.055ms | |
// 13 salt round: 476.671ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment