aspose file tools*
The moose likes JSP and the fly likes java code to keep password in ******** format in database(sql server) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "java code to keep password in ******** format in database(sql server)" Watch "java code to keep password in ******** format in database(sql server)" New topic
Author

java code to keep password in ******** format in database(sql server)

hidutta duttax
Greenhorn

Joined: Feb 21, 2007
Posts: 1
Respected sir/Madam,
I want to know how to keep password in ******** format
in database(sql server)using jsp code of servlet code.

Thanks & Regards
Goutam Dutta
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Storing a password ****** in the database sounds pointless, as there's no way to get the real password back
If you mean that you want to encrypt the password, then the following thread may interest you :
http://www.coderanch.com/t/291488/JSP/java/Encryption-JSP


[My Blog]
All roads lead to JavaRanch
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
hi Goutam...
Dont bother too much..
I will soon send you the code because i got it and will show you when i will be back
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Welcome to JavaRanch.

A better approach than storing cleartext or encrypted passwords in a DB is to store a hashed version of the password. That way, nobody can get at the password, and there's no need to deal with en-/decryption. It is as easy as:


Ping & DNS - my free Android networking tools app
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java code to keep password in ******** format in database(sql server)