简体   繁体   English

单向SHA1哈希javascript实现?

[英]one way SHA1 hash javascript implementation?

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. 我有一台没有使用SSL的服务器,所以我试图找到一种方法来保护传递给服务器的数据。 My first thought was jCryption , but it is not exactly what I need. 我的第一个想法是jCryption ,但它并不完全是我需要的。 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? 所以我的问题是,是否有一个sha1实用程序可以用于PHP的密码验证目的?

Try the Stanford Crypto library. 试试Stanford Crypto图书馆。 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). 它非常全面,但是如果你只需要一个散列函数,你可以从核心中提取它(它有sha1和256)。

Refer This 请参阅此

You shouldn't be using SHA1 to do your hashing anymore, since it's been broken for a while. 你不应该再使用SHA1进行散列,因为它已经被打破了一段时间。 Try SHA256. 试试SHA256。

我认为这就是你要找的东西: http//phpjs.org/functions/sha1512

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM