开发者

Password Displayed on inputSecret too long

开发者 https://www.devze.com 2023-04-09 10:39 出处:网络
I Use JSF 1.2 and i want to display a password as six characters for the user, and since i use an md5 encryption, so the password is displayed too long.

I Use JSF 1.2 and i want to display a password as six characters for the user, and since i use an md5 encryption, so the password is displayed too long.

This is my code

<h:inputSecret  id="password"
             开发者_如何学编程  redisplay="true"           
              value="{userHome.instance.password" 
                    style="FONT-SIZE: medium;" title="Password">     
                          </h:inputSecret>

Thks a lot


You should only apply MD5 hashing at the point the data is to be saved in the DB, not before.

You should not obtain the password from the DB whenever you present an edit form to the enduser. You should keep the field empty.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号