View Full Version : Encryption and JAVA
Floppyman
04-20-2004, 01:38 AM
Hi all,
I'm looking for encryption algorithm (perhaps based off blowfish, DES, or AES) that will work with JAVA. The thing is that I need to be able to encrypt strings and all I have been able to find are implementations that encrypt arrays of bytes. Does anyone out there have any suggestions/ideas? Thanks in advance.
Jaggannath
04-20-2004, 05:34 AM
We once wrote a program that did exactly that. I'll try find it's code for you now
It was very basic though... you still want it, or you looking for something swish??
claudelacey
04-20-2004, 08:57 AM
You can find free source code for the Blowfish algorithm on the Counterpane website, do a search for it in google.
What I did was convert the string to a byte array and then encrypt it as standard using Blowfish.
doctorgonzo
04-20-2004, 09:13 AM
All encryption algorithms encrypt byte arrays. But that's no problem; a string is a byte array too.
This site looks like it has a Blowfish implementation in Java: http://web.bsn.ch/lasse/bfacs.htm
If you are really interested in cryptography, get the book Applied Cryptography by Bruce Schneier. It has C source code for many algorithms. It would take some work to port the code to Java, since it relies heavily on memory pointers, but it could be done.
Floppyman
04-22-2004, 12:36 AM
Thanks for the replies. The information that was on the site doctorgonzo posted is what I needed. Thanks again.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.