Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java Security
打印话题 寄给朋友 订阅主题 |
作者 | 问题在哪里呢? [Re:bvw] |
menzy
版主 发贴: 754 积分: 113 |
于 2003-01-08 17:04
你这样做有什么问题么?我看不出来。 如果直接不行的话,可以按用户名查询加密的口令 然后翻转匹配试试看。 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
bvw
发贴: 0 积分: 0 |
于 2003-01-08 17:11
我想请问的是这个加密函数Crypto()怎么写 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
menzy
版主 发贴: 754 积分: 113 |
于 2003-01-09 08:11
别人的东西,给你看看 BeanTools.java.txt (3.64k) |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
bvw
发贴: 0 积分: 0 |
于 2003-01-09 16:20
salt? 包歉,我的英语不太好,不明白是什么意思? 非常感谢你的帮助。 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
floater
Java Jedi 总版主 发贴: 3233 积分: 421 |
于 2003-01-10 03:15
Salt is something that makes attackers uncomfortable, like sand in eyes, . Also, the number of iterations of hashing is used to make it harder to crack. I don't have anything in chinese, so you have to read this english doc from rsa. Security is something about the weakest link, i.e., if you do 99 things right and do 1 thing wrong, it will blow off on you. In World War 2, German made one simple mistake(used natural order of alphabets, like abcd, instead of random order, like dhkjnwer), then Polish and british could crack their code to certain degree. So beware. pkcs5v2-0.pdf (142.3k) "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler, Refactoring - Improving the Design of Existing Code |
作者 | floater精神可嘉 [Re:bvw] |
menzy
版主 发贴: 754 积分: 113 |
于 2003-01-10 07:41
加分 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
TienShih
发贴: 0 积分: 0 |
于 2003-01-14 16:16
其实这不是加密,是用摘要算法如MD5、SHA-1等,将password算出一个摘要值存到数据库中,由于摘要算法是不可逆的,所以无法根据摘要值反推原来的数据。找一段用Java计算摘要的程序就行了。 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
menzy
版主 发贴: 754 积分: 113 |
于 2003-01-15 08:46
楼上的观点是正确的,的确不能叫加密 |
作者 | Re:我想把用户的密码加密后存入数据库中,怎么实现 [Re:bvw] |
njord
发贴: 0 积分: 0 |
于 2003-01-15 22:08
HASH一下就可以了,这样不会暴露原有的密码,只需要比较摘要值。 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |