Node.js hashing of passwords

前端 未结 6 565
小鲜肉
小鲜肉 2021-01-29 23:25

I am currently using the following for hashing passwords:

var pass_shasum = crypto.createHash(\'sha256\').update(req.body.password).digest(\'hex\');
6条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 00:01

    Also there is bcrypt-nodejs module for node. https://github.com/shaneGirish/bcrypt-nodejs.

    Previously I used already mentioned here bcrypt module, but fall into problems on win7 x64. On the other hand bcrypt-nodejs is pure JS implementation of bcrypt and does not have any dependencies at all.

提交回复
热议问题