Package com.trilead.ssh2.crypto.cipher
Class BlowFish
java.lang.Object
com.trilead.ssh2.crypto.cipher.BlowFish
- All Implemented Interfaces:
BlockCipher
public class BlowFish extends Object implements BlockCipher
A class that provides Blowfish key encryption operations, such as encoding
data and generating keys. All the algorithms herein are from Applied
Cryptography and implement a simplified cryptography interface.
- Version:
- $Id: BlowFish.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
- Author:
- See comments in the source file
-
Constructor Summary
Constructors Constructor Description BlowFish() -
Method Summary
Modifier and Type Method Description StringgetAlgorithmName()intgetBlockSize()voidinit(boolean encrypting, byte[] key)initialise a Blowfish cipher.voidreset()voidtransformBlock(byte[] in, int inOff, byte[] out, int outOff)
-
Constructor Details
-
BlowFish
public BlowFish()
-
-
Method Details
-
init
public void init(boolean encrypting, byte[] key)initialise a Blowfish cipher.- Specified by:
initin interfaceBlockCipher- Parameters:
encrypting- whether or not we are for encryption.key- the key required to set up the cipher.- Throws:
IllegalArgumentException- if the params argument is inappropriate.
-
getAlgorithmName
-
transformBlock
public final void transformBlock(byte[] in, int inOff, byte[] out, int outOff)- Specified by:
transformBlockin interfaceBlockCipher
-
reset
public void reset() -
getBlockSize
public int getBlockSize()- Specified by:
getBlockSizein interfaceBlockCipher
-