为什么给我用户名时密码不显示 [英] why the password is not displayed when I gave the username

查看:53
本文介绍了为什么给我用户名时密码不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将用户名和密码存储到cookie``myCookie''中,并检查了页面加载中是否存在cookie.如果存在,我已经说过了

I have stored the username and password to a cookie ''myCookie''.and have checked whether the cookie ispresent or not in the load of the page.and if present I have said

txtuser.Text=cookie.value["username"];
txtpass.Text=cookie.value["password"];


txtpass的属性设置为password,但是在加载此页面时txtpass没有值.
当我将txtpass的属性更改为单行时,将显示它.

我想在输入用户名时显示密码.请帮忙!


the property of txtpass is set to password, but txtpass is not having value when this is page is loaded.
When I changed the property of txtpass to singleline it is displayed.

I want to display the password when the usernaem is typed. Please Help!

推荐答案

然后为什么不使用Single Line?你说它显示出来了...

另外,我建议您重新考虑一下.显示密码是安全的禁忌!您可以记住密码,可以显示传统的"blob"密码,但实际上不应该将密码以明文形式存储-也不要将其以明文形式存储在cookie中.

看看使用MD5或(最好是)SHA来对您的密码进行哈希处理,这并不困难,而且可以无休止地提高安全性...
Then why not use Single Line? You say it is displayed then...

In addition, I suggest that you re-think this. Displaying passwords is a security no-no! You can offer to remember passwords, you can show the traditional "blob" password, but you really shouldn''t put a password up in clear - or store it in clear in a cookie, either.

Look at hashing your passwords using MD5 or (preferably) SHA instead, it isn''t difficult and it improves the security no end...


这篇关于为什么给我用户名时密码不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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