The main class that you will need is the BlowFishCryptor. It's a easy to use wrapper that I wrote for the other 2 blowfish classes. The other 2 files are directly translated from openssl library, and i think it is done by some guru from this forum; sparkie knows who that person is; i do not think he will mind me sharing his codes ")
Before you use them, make sure you change the package title in the codes
here is a sample of how the cryptor object should be invoked.
I have had all my ciphers implementing ConquerCipher interface. It is really up to you if you want to do that; amend your codes necessarily if you not. I have included the interface in the downloads as well.
Though this is redundant, just incase you're mentally blocked from chewing your codes and others, the way to declare cipher without implementing ConquerCipher interface is:
private/public BlowFishCryptor aCipher;
Code:
private ConquerCipher DHcipher = new GameCryptographer(), ServerCipher = null, ClientCipher = null;
The key BlowFishCryptor accepts is the 64 byte array generated by KeyAgreement.getSecret();
Code:
ServerCipher = new BlowFishCryptor(dhhandler.getProxyServerKey(), dhhandler.getServerIV(), dhhandler.getClientIV()); ClientCipher = new BlowFishCryptor(dhhandler.getProxyClientKey(), dhhandler.getClientIV(), dhhandler.getServerIV());