返回使用MD5 fubction生成的值 [英] return back the value generated using MD5 fubction
问题描述
在将密码存储在数据库中之前,我使用 md5 PHP函数。
场景:我提供了一个密码检索程序。在验证用户名真的存在之后,发送一封包含他/她的密码和用户名的电子邮件。
问题:我无法返回加密值。
例如密码: 123456 md5密码: sdfgn234uih893hu9hu92rh8g58 ......(数据库中的32size)
我想要回到真正的价值到123456。
Constraits:我不想在发电子邮件之前生成新密码。我想发回他/她当前使用的密码。
I use md5 function of PHP before storing the password in the database.
Scenario: I put an password retrieval program. After authentication that the username is realy exist, send an email containing his/her password and username.
Problem: I cannot return back the encrypted value.
e.g. password: 123456 md5 password: sdfgn234uih893hu9hu92rh8g58...... (32size in DB)
I want back the real value to "123456".
Constraits: I dont want to generate new password before do the email. I want to send back his/her currently used password.
推荐答案
在关于哈希的关于volectricity的一些争论后,我明白了哈希不能被解密。检查散列数据是否相同的唯一方法是将散列数据存储到数据库,并通过散列将其与用户输入进行比较。
MD5返回散列数据。
你需要的是一个双向加密函数。
After a few argument with volectricity about hashing I came to a point to understand that hashing cannot be decrypted. The only way you can check if the hashed data is the same is by storing a hashed data to your db and comparing it to user input by hashing it.
MD5 returns a hashed data.
What you need is a two way encryption function.
经过几次争论后关于哈希的关于我的理解我已经明白哈希不能被解密了。检查散列数据是否相同的唯一方法是将散列数据存储到数据库,并通过散列将其与用户输入进行比较。
MD5返回散列数据。
您需要的是双向加密功能。
After a few argument with volectricity about hashing I came to a point to understand that hashing cannot be decrypted. The only way you can check if the hashed data is the same is by storing a hashed data to your db and comparing it to user input by hashing it.
MD5 returns a hashed data.
What you need is a two way encryption function.
如果我的理解错误,请纠正我。
我将创建md5的散列数据列表和相应的实数值?也许它正在添加另一个字段或另一个表?
双向加密函数是什么意思?
Please correct me if my understanding is wrong.
I will create a list of hashed data by md5 and corresponding real values? Maybe it is adding another field or another table?
What do you mean by two-way encryption function?
这意味着如果网站有能力发送回原始密码不使用md5函数..也许创建了自己的加密函数,即他们可以解密数据。或者他们在数据库中存储密码时没有使用任何加密。
It means that if the site have a capabilities to send back the original password is not using a md5 function.. maybe created their own encryption function, that''s they can decrypt the data. Or they are not using any encryption in storing passwords in the database.
这篇关于返回使用MD5 fubction生成的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!