使用Md5& SHA1在JAVA中散列密码 [英] Use Md5 & SHA1 to hash passwords in JAVA

查看:103
本文介绍了使用Md5& SHA1在JAVA中散列密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试在我的课堂上演示MD5算法。

我想在每个编程中给出一个md5哈希的例子语言。

我找到了一个有用的网站,如 md5-sha ,其中包含所有其他语言的示例,但是我仍然希望将Java用于广泛使用。

感谢您的帮助。

解决方案

考虑到MD5和SHA1都是两者都被认为是破碎,不应该用于任何安全目的。使用它们保护密码被认为是不良做法和安全风险。



阅读更多信息,这里 [ ^ ]。


< blockquote>解决方案2是正确的。您已经可以使用SHA-3:ripple-lib-java/SHA3.java at master·ripple / ripple-lib-java·GitHub [ ^ ]。



这是SHA-2: Google代码存档 - Google代码项目托管的长期存储。 [ ^ ]。



SHA-2和SHA-3都被认为是可靠的。请参阅:

SHA-2 - 维基百科,免费的百科全书 [ ^ ],

SHA-3 - 维基百科,免费的百科全书 [ ^ ]。



-SA


Class MessageDigest,我相信。



MessageDigest(Java Platform SE 6) [ ^ ]


Hello everyobody,
I'm trying to do a presentation of MD5 algorithm in my class.
I would like to give an example of md5 hash in every programming language.
I found a useful website like md5-sha with examples in all other languages, but i still want to present Java too du to its wide use.
Thank you for helping.

解决方案

Consider that both MD5 and SHA1 are both considered "broken" and should not be used for any security purpose what-so-ever. Using them to "secure" a password is considered bad practice and a security risk.

Read up more on it, here[^].


Solution 2 is correct. You can use SHA-3 already: ripple-lib-java/SHA3.java at master · ripple/ripple-lib-java · GitHub[^].

And this is SHA-2: Google Code Archive - Long-term storage for Google Code Project Hosting.[^].

Both SHA-2 and SHA-3 are considered reliable. Please see:
SHA-2 — Wikipedia, the free encyclopedia[^],
SHA-3 — Wikipedia, the free encyclopedia[^].

—SA


Class MessageDigest, I believe.

MessageDigest (Java Platform SE 6)[^]


这篇关于使用Md5&amp; SHA1在JAVA中散列密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆