作者iFEELing (ing)
看板PHP
标题Re: [请益] 请问有关於密码查寻
时间Sat Oct 28 12:02:50 2006
※ 引述《yigeo (wico)》之铭言:
: 请问一下
: 注册时
: 是使用 MD5 加密後存到资料库
: 那当我要查询密码时该如何反查密码 ?
: (做忘记密码功能的页面)
: 谢谢
MD5, DES 这种方法不是 "加密" 是 "单向Hash"
理论上由密文推回原文趋近不可能
实作上由於软硬体限制,实作目标会变成"在有限时间内趋近不可能"
所以你要做"忘记密码"有两种方式
其一是把所有密码原文另外存一份,不过这样就失去用MD5的意义
其二是乱数给他一个新密码,要他自己进去改
--
And they... Will dance if they want to dance Please brother take a chance
You know they're gonna go Which way they wanna go
All we know is that we don't know
What is gonna be Please brother let it be
Life on the other hand won't let you understand
Why we're all part of the masterplan _
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.244.196
1F:→ miniko70:没错~重设密码的时候就用乱数再让它去跑了~ 10/29 01:58