one way SHA1 hash javascript implementation?

99封情书 提交于 2019-11-27 17:02:53

问题


I have a server that is not using SSL, so I'm trying to find a way to secure the data being passed to the server. My first thought was jCryption, but it is not exactly what I need. So what I decided is that I could just pre-hash the password and send it to the server for comparison. So my question is, is there a sha1 utility that can be used for password verification purposes with PHP?


回答1:


Try the Stanford Crypto library. It's pretty comprehensive but if you just need a single hashing function you can extract it from the core (it has sha1 and 256).

Refer This




回答2:


You shouldn't be using SHA1 to do your hashing anymore, since it's been broken for a while. Try SHA256.




回答3:


I think that's what you're looking for: http://phpjs.org/functions/sha1:512



来源:https://stackoverflow.com/questions/9610921/one-way-sha1-hash-javascript-implementation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!