Java 类org.bouncycastle.crypto.engines.Shacal2Engine 实例源码

项目:vsDiaryWriter    文件:BlockCiphers.java   
private static void initBlockCipherEngines() {
    blockCipherEngines.put("MARS", MarsEngine.class);
    blockCipherEngines.put("AES", AESEngine.class);
    blockCipherEngines.put("Blowfish", BlowfishEngine.class);
    blockCipherEngines.put("Camellia", CamelliaEngine.class);
    blockCipherEngines.put("CAST5", CAST5Engine.class);
    blockCipherEngines.put("CAST6", CAST6Engine.class);
    blockCipherEngines.put("DESede", DESedeEngine.class);
    blockCipherEngines.put("DES", DESEngine.class);
    blockCipherEngines.put("GOST28147", GOST28147Engine.class);
    blockCipherEngines.put("IDEA", IDEAEngine.class);
    blockCipherEngines.put("Noekeon", NoekeonEngine.class);
    blockCipherEngines.put("RC2", RC2Engine.class);
    blockCipherEngines.put("RC5", RC532Engine.class);
    blockCipherEngines.put("RC6", RC6Engine.class);
    blockCipherEngines.put("SEED", SEEDEngine.class);
    blockCipherEngines.put("Serpent", SerpentEngine.class);
    blockCipherEngines.put("Shacal2", Shacal2Engine.class);
    blockCipherEngines.put("Skipjack", SkipjackEngine.class);
    blockCipherEngines.put("SM4", SM4Engine.class);
    blockCipherEngines.put("TEA", TEAEngine.class);
    blockCipherEngines.put("Twofish", TwofishEngine.class);
    blockCipherEngines.put("XTEA", XTEAEngine.class);
    blockCipherEngines.put("Threefish", ThreefishEngine.class);
}
项目:gwt-crypto    文件:Shacal2Test.java   
private void iteratedTest(int index, byte[] key, byte[] plain, byte[] cipher, byte[] cipher100, byte[] cipher1000)
{
    BlockCipher engine = new Shacal2Engine();

    engine.init(true, new KeyParameter(key));

    byte[] buf = new byte[plain.length];

    System.arraycopy(plain, 0, buf, 0, plain.length);

    engine.processBlock(buf, 0, buf, 0);

    if (!Arrays.areEqual(cipher, buf))
    {
        fail(index + " single count failed");
    }

    for (int i = 1; i != 100; i++)
    {
        engine.processBlock(buf, 0, buf, 0);
    }

    if (!Arrays.areEqual(cipher100, buf))
    {
        fail(index + " 100 count failed");
    }

    for (int i = 100; i != 1000; i++)
    {
        engine.processBlock(buf, 0, buf, 0);
    }

    if (!Arrays.areEqual(cipher1000, buf))
    {
        fail(index + " 1000 count failed");
    }
}
项目:Aki-SSL    文件:Shacal2.java   
public ECB()
{
    super(new BlockCipherProvider()
    {
        public BlockCipher get()
        {
            return new Shacal2Engine();
        }
    });
}
项目:CryptMeme    文件:Shacal2.java   
public ECB()
{
    super(new BlockCipherProvider()
    {
        public BlockCipher get()
        {
            return new Shacal2Engine();
        }
    });
}
项目:gwt-crypto    文件:Shacal2Test.java   
Shacal2Test()
{
    super(tests, new Shacal2Engine(), new KeyParameter(new byte[16]));
}
项目:Aki-SSL    文件:Shacal2.java   
public CBC()
{
    super(new CBCBlockCipher(new Shacal2Engine()), 256);//block size
}
项目:Aki-SSL    文件:Shacal2.java   
public CMAC()
{
    super(new CMac(new Shacal2Engine()));
}
项目:CryptMeme    文件:Shacal2.java   
public CBC()
{
    super(new CBCBlockCipher(new Shacal2Engine()), 256);//block size
}