Crypto.compute给出错误的结果,即使密码和salt与我的数据库中的相同。 [英] Crypto.compute gives wrong result even the password and salt are the same with in my database.
问题描述
下面有2张图片显示调试
注册图片:
https://fbcdn-sphotos-ha.akamaihd。 net / hphotos-ak-xpa1 / v / t35.0-12 / 10947819_938922822787344_1268417370_o.jpg?oh = 712f70d3c4f73b84f6347ef701e69699& oe = 54C8175C& __ gda __ = 1422401980_e17f683f887473ad03e8391d7b15a7a4 [ ^ ]
登录图片:
https://fbcdn-sphotos-ha.akamaihd.net/hphotos-ak-xpf1/v/t35.0-12/10943502_938922909454002_1248116836_o.jpg?oh=bb746b9e7a4d43c19ce803a001149aa9&oe=54C72E5D& ; __ gda __ = 1422330253_e254c4162125bf96eae80864ceb6428f [ ^ ]
我发现我的user.Password和user.Password.Salt有空格。为了解决我的问题,我使用trim()来删除所有空格。 =)
I have 2 images below showing the Debugs
Register Image:
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpa1/v/t35.0-12/10947819_938922822787344_1268417370_o.jpg?oh=712f70d3c4f73b84f6347ef701e69699&oe=54C8175C&__gda__=1422401980_e17f683f887473ad03e8391d7b15a7a4[^]
LogIn Image:
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t35.0-12/10943502_938922909454002_1248116836_o.jpg?oh=bb746b9e7a4d43c19ce803a001149aa9&oe=54C72E5D&__gda__=1422330253_e254c4162125bf96eae80864ceb6428f[^]
I discovered that my user.Password and user.Password.Salt have whitespaces. To solve my problem, I used trim() to remove all whitespaces. =)
这篇关于Crypto.compute给出错误的结果,即使密码和salt与我的数据库中的相同。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!