File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Simple password encryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Simple password encryption" Watch "Simple password encryption" New topic

Simple password encryption

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
Hi Everybody,
I have a problem here. I need to encrypt my passwords in the database. I dont want to use the powerful java Cryptography API which requires the download of JCE . I want the encryption to be simple. How can i do it??
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
You can Hash it and store the hash, you can checksum it and store the checksum, you can alternately shift each chacter a set number of bits a different way, you can develop your own letter substitution matrix like the old decoder rings. or you can mask the string with a key. You could use UUEncode or Base64Encode. Any of these ways will work.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: Simple password encryption
It's not a secret anymore!