Example usage for org.bouncycastle.crypto.engines CAST6Engine CAST6Engine

List of usage examples for org.bouncycastle.crypto.engines CAST6Engine CAST6Engine

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.engines CAST6Engine CAST6Engine.

Prototype

public CAST6Engine() 

Source Link

Usage

From source file:org.cryptacular.spec.BlockCipherSpec.java

License:Open Source License

@Override
public BlockCipher newInstance() {
    BlockCipher cipher;/*from  w  w  w  .j  a  va  2s  .c  o  m*/
    if ("AES".equalsIgnoreCase(algorithm)) {
        cipher = new AESFastEngine();
    } else if ("Blowfish".equalsIgnoreCase(algorithm)) {
        cipher = new BlowfishEngine();
    } else if ("Camellia".equalsIgnoreCase(algorithm)) {
        cipher = new CamelliaEngine();
    } else if ("CAST5".equalsIgnoreCase(algorithm)) {
        cipher = new CAST5Engine();
    } else if ("CAST6".equalsIgnoreCase(algorithm)) {
        cipher = new CAST6Engine();
    } else if ("DES".equalsIgnoreCase(algorithm)) {
        cipher = new DESEngine();
    } else if ("DESede".equalsIgnoreCase(algorithm) || "DES3".equalsIgnoreCase(algorithm)) {
        cipher = new DESedeEngine();
    } else if ("GOST".equalsIgnoreCase(algorithm) || "GOST28147".equals(algorithm)) {
        cipher = new GOST28147Engine();
    } else if ("Noekeon".equalsIgnoreCase(algorithm)) {
        cipher = new NoekeonEngine();
    } else if ("RC2".equalsIgnoreCase(algorithm)) {
        cipher = new RC2Engine();
    } else if ("RC5".equalsIgnoreCase(algorithm)) {
        cipher = new RC564Engine();
    } else if ("RC6".equalsIgnoreCase(algorithm)) {
        cipher = new RC6Engine();
    } else if ("SEED".equalsIgnoreCase(algorithm)) {
        cipher = new SEEDEngine();
    } else if ("Serpent".equalsIgnoreCase(algorithm)) {
        cipher = new SerpentEngine();
    } else if ("Skipjack".equalsIgnoreCase(algorithm)) {
        cipher = new SkipjackEngine();
    } else if ("TEA".equalsIgnoreCase(algorithm)) {
        cipher = new TEAEngine();
    } else if ("Twofish".equalsIgnoreCase(algorithm)) {
        cipher = new TwofishEngine();
    } else if ("XTEA".equalsIgnoreCase(algorithm)) {
        cipher = new XTEAEngine();
    } else {
        throw new IllegalStateException("Unsupported cipher algorithm " + algorithm);
    }
    return cipher;
}

From source file:org.xwiki.crypto.cipher.internal.symmetric.factory.BcCast6CbcPaddedCipherFactory.java

License:Open Source License

@Override
protected BlockCipher getEngineInstance() {
    return new CAST6Engine();
}