NodeJS:bcrypt与本机加密 [英] NodeJS: bcrypt vs native crypto
本文介绍了NodeJS:bcrypt与本机加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以指出两者之间的区别以及使用每种情况的示例情况吗?
Can someone point out the differences between the two and example situations where use each?
bcrypt看起来很棒.
bcrypt looks great.
推荐答案
在需要执行缓慢且计算量大的哈希的地方使用bcrypt-通常用于哈希表,在这些哈希表中您确实不希望攻击者能够反转哈希,例如用户密码.将本机加密用于其他所有内容.
Use bcrypt where you want to do slow and computationally expensive hashing -- this will generally be for hashes where you really don't want an attacker to be able to reverse the hash, e.g. user passwords. Use native crypto for everything else.
这篇关于NodeJS:bcrypt与本机加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文