SALT and HASH using pbkdf2

后端 未结 2 793
名媛妹妹
名媛妹妹 2021-01-30 14:00

I am using the following methods to create a salted and hashed password from the crypto lib in nodejs:

crypto.randomBytes(size, [callback])
crypto.pbkdf2(passwor         


        
2条回答
  •  春和景丽
    2021-01-30 15:01

    Fernando is mostly correct, but beware that #3 is mis-sourced. The recommended salt length is 64 bits, not bytes.

    Using 64 bytes for the derived key is acceptable, but would be overkill for the salt alone.

提交回复
热议问题