-2
bcrypt.hash(password,12, function(err, hash) {});

Please explain about hash value. (e.g why we use 12 or 8 or 16 pass the value )

Blauharley
  • 4,186
  • 6
  • 28
  • 47
javed
  • 9
  • 1
  • 3
    Possible duplicate of [What are Salt Rounds and how are Salts stored in Bcrypt?](https://stackoverflow.com/questions/46693430/what-are-salt-rounds-and-how-are-salts-stored-in-bcrypt) – Obsidian Age Jan 30 '18 at 03:52

1 Answers1

-1

If you’re wondering what the 10 (that’s used for hashing) is, then that’s the work factor or the number of rounds the data is processed for. More rounds leads to more secured hash but slower/expensive process.

As more salt are:

rounds=8 : ~40 hashes/sec
rounds=9 : ~20 hashes/sec
rounds=10: ~10 hashes/sec
rounds=11: ~5  hashes/sec
rounds=12: 2-3 hashes/sec

for more information visit on: https://www.npmjs.com/package/bcrypt

Kunvar Singh
  • 1,779
  • 2
  • 13
  • 21