Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2009, 03:06 AM
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to encrypt/decrypt the password

Hi

Our DB connection information is stroe in server.xml file. so how to call decryption code.We are not using any autogenerated key.

I was thinking of building a simple class where user could type in their desired password, get an encrypted version of the password, then paste the encrypted version into the xml configuration file. Then the
application would read encrypted password, decrypt the password back into a string, and move on.

please suggest/ideas for helping for the same.



thanks
lalit

Last edited by imlalit; August 7th, 2009 at 03:12 AM..
 
Old October 5th, 2009, 01:41 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

one way of doing it is have an extra column to store digested password, when user's signup, digest it and store it that column. As per your question i think you are using realms for authentication. Extend the realm class you are using and write your code to check the digest password column [digest the password entered by the user and use it in query] instead of password column.

Hope it gives a start!
__________________
- Rakesh
http://iam-rakesh.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypt and decrypt query string hanusoftware ASP.NET 2.0 Professional 1 July 16th, 2007 04:53 AM
encrypt and decrypt fuadlutfi85 Pro JSP 0 July 5th, 2007 09:00 PM
How to encrypt and decrypt a pwd in vb.net harshaghanta ASP.NET 1.0 and 1.1 Professional 4 July 27th, 2006 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.