Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 14687
    
  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: 41087
    
  43
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java code to keep password in ******** format in database(sql server)
 
Similar Threads
how to convert .csv files into sql server files using java
Creating DSN
char to binary
Passwords
problem with connecting to a SQLServer database