Password Displayed on inputSecret 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.
精彩评论