ccs.crypt
Class BlowfishWrapper
java.lang.Object
ccs.crypt.BlowfishWrapper
- All Implemented Interfaces:
- org.bouncycastle.crypto.BlockCipher
public class BlowfishWrapper
- extends java.lang.Object
- implements org.bouncycastle.crypto.BlockCipher
A wrapper around the BouncyCastle Blowfish engine. The wrapper provides
modified key handling to cope with very long keys (anything over 56 bytes
is hashed down to 40 bytes; this allows you to distil a silk purse out
of several sow's ears.) Also anything shorter than 8 bytes is disallowed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlowfishWrapper
public BlowfishWrapper()
init
public void init(boolean encrypting,
org.bouncycastle.crypto.CipherParameters params)
- Specified by:
init
in interface org.bouncycastle.crypto.BlockCipher
getAlgorithmName
public java.lang.String getAlgorithmName()
- Specified by:
getAlgorithmName
in interface org.bouncycastle.crypto.BlockCipher
getBlockSize
public int getBlockSize()
- Specified by:
getBlockSize
in interface org.bouncycastle.crypto.BlockCipher
processBlock
public int processBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
throws org.bouncycastle.crypto.DataLengthException,
java.lang.IllegalStateException
- Specified by:
processBlock
in interface org.bouncycastle.crypto.BlockCipher
- Throws:
org.bouncycastle.crypto.DataLengthException
java.lang.IllegalStateException
reset
public void reset()
- Specified by:
reset
in interface org.bouncycastle.crypto.BlockCipher