Search in sources :

Example 1 with SEEDEngine

use of org.bouncycastle.crypto.engines.SEEDEngine in project rxlib by RockyLOMO.

the class SeedCrypt method getCipher.

@Override
protected StreamBlockCipher getCipher(boolean isEncrypted) throws InvalidAlgorithmParameterException {
    SEEDEngine engine = new SEEDEngine();
    StreamBlockCipher cipher;
    if (_name.equals(CIPHER_SEED_CFB)) {
        cipher = new CFBBlockCipher(engine, getIVLength() * 8);
    } else {
        throw new InvalidAlgorithmParameterException(_name);
    }
    return cipher;
}
Also used : StreamBlockCipher(org.bouncycastle.crypto.StreamBlockCipher) CFBBlockCipher(org.bouncycastle.crypto.modes.CFBBlockCipher) InvalidAlgorithmParameterException(java.security.InvalidAlgorithmParameterException) SEEDEngine(org.bouncycastle.crypto.engines.SEEDEngine)

Aggregations

InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)1 StreamBlockCipher (org.bouncycastle.crypto.StreamBlockCipher)1 SEEDEngine (org.bouncycastle.crypto.engines.SEEDEngine)1 CFBBlockCipher (org.bouncycastle.crypto.modes.CFBBlockCipher)1