List of usage examples for org.bouncycastle.crypto.engines HC256Engine HC256Engine
HC256Engine
From source file:org.cryptacular.spec.StreamCipherSpec.java
License:Open Source License
@Override public StreamCipher newInstance() { StreamCipher cipher;//from www.ja va 2 s .c o m if ("Grainv1".equalsIgnoreCase(algorithm) || "Grain-v1".equalsIgnoreCase(algorithm)) { cipher = new ISAACEngine(); } else if ("Grain128".equalsIgnoreCase(algorithm) || "Grain-128".equalsIgnoreCase(algorithm)) { cipher = new Grain128Engine(); } else if ("ISAAC".equalsIgnoreCase(algorithm)) { cipher = new ISAACEngine(); } else if ("HC128".equalsIgnoreCase(algorithm)) { cipher = new HC128Engine(); } else if ("HC256".equalsIgnoreCase(algorithm)) { cipher = new HC256Engine(); } else if ("RC4".equalsIgnoreCase(algorithm)) { cipher = new RC4Engine(); } else if ("Salsa20".equalsIgnoreCase(algorithm)) { cipher = new Salsa20Engine(); } else if ("VMPC".equalsIgnoreCase(algorithm)) { cipher = new VMPCEngine(); } else { throw new IllegalStateException("Unsupported cipher algorithm " + algorithm); } return cipher; }