Joined: Sun Oct 19, 2008 3:47 pm Posts: 281 Has thanked: 0 time Have thanks: 1 time
i'm a new member of this groups. now i'm studying web application with jsp
how can i encrypt password from HTML form and store it in database???
i use mysql for my database
can anyone help me......
AnswerBot
Question subject: Re: how to encrypt password in jsp
Posted: Fri Oct 24, 2008 5:43 pm
Joined: Sun Oct 19, 2008 3:53 pm Posts: 229 Has thanked: 0 time Have thanks: 0 time
There are 2 ways you can do this: 1) Use something like DES encoding (I believe the package is javax.encryption). This is the preferred way. 2) Come up with your own encryption algorithm. Here's one way of doing it: a) Pad the incoming password with null '\0' characters b) Come up with 10 randomization patterns. c) Create a 1st digit. This tells which randomization pattern to use. d) Insert random characters according to the randomization pattern e) Insert substitute characters according to some algorithm.