What is Ferris Crypto

Ferris Crypto is a project containing classes related to cryptology. Theses classes provide fascades over the javax.crypto package.

Try It!

Blowfish

In cryptography, Blowfish is a keyed, symmetric block cipher, designed in 1993 by Bruce Schneier. Schneier designed Blowfish as a general-purpose algorithm, intended as a replacement for the aging DES and free of the problems associated with other algorithms. Schneier has stated that, "Blowfish is unpatented, and will remain so in all countries. The algorithm is hereby placed in the public domain, and can be freely used by anyone." Blowfish provides a good encryption rate in software and no effective cryptanalysis of it has been found to date. To Blowfish encrypt/decrypt a String cut & paste the following:

Blowfish blowfish = null;
// Encrypt
blowfish = new Blowfish();
byte [] encrypted = blowfish.encrypt("encrypte me");		
// Decrypt
blowfish = new Blowfish();
String decrypted = blowfish.decrypt(encrypted);      	
      	

Remember, the byte[] returned by blowfish.encrypt("") will contain non-ascii characters. So use a Base64 encoding of the byte[] if you need ascii characters.

DES

The Data Encryption Standard (DES) is a method for encrypting and decrypting information. DES is now considered to be insecure for many applications. This is chiefly due to the 56-bit key size being too small; in January, 1999, distributed.net and the Electronic Frontier Foundation collaborated to publicly break a DES key in 22 hours and 15 minutes (see chronology). To DES encrypt/decrypt a String cut & paste the following:

DES des = null;
// Encrypt
des = new DES();
byte [] encrypted = des.encrypt("encrypte me");		
// Decrypt
des = new DES();
String decrypted = des.decrypt(encrypted);  	
      	

Remember, the byte[] returned by des.encrypt("") will contain non-ascii characters. So use a Base64 encoding of the byte[] if you need ascii characters.