use of org.bouncycastle.crypto.engines.BlowfishEngine in project rxlib by RockyLOMO.
the class BlowFishCrypt method getCipher.
@Override
protected StreamBlockCipher getCipher(boolean isEncrypted) throws InvalidAlgorithmParameterException {
BlowfishEngine engine = new BlowfishEngine();
StreamBlockCipher cipher;
if (_name.equals(CIPHER_BLOWFISH_CFB)) {
cipher = new CFBBlockCipher(engine, getIVLength() * 8);
} else {
throw new InvalidAlgorithmParameterException(_name);
}
return cipher;
}
Aggregations