• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SkipjackEngine类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.bouncycastle.crypto.engines.SkipjackEngine的典型用法代码示例。如果您正苦于以下问题:Java SkipjackEngine类的具体用法?Java SkipjackEngine怎么用?Java SkipjackEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SkipjackEngine类属于org.bouncycastle.crypto.engines包,在下文中一共展示了SkipjackEngine类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initBlockCipherEngines

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
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);
}
 
开发者ID:shilongdai,项目名称:vsDiaryWriter,代码行数:26,代码来源:BlockCiphers.java


示例2: Skipjack_CFB8

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public Skipjack_CFB8()
{
    super(new CFBBlockCipher(new SkipjackEngine(), 8), 64);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:JCEStreamCipher.java


示例3: Skipjack_OFB8

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public Skipjack_OFB8()
{
    super(new OFBBlockCipher(new SkipjackEngine(), 8), 64);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:JCEStreamCipher.java


示例4: ECB

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public ECB()
{
    super(new SkipjackEngine());
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:Skipjack.java


示例5: Mac

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public Mac()
{
    super(new CBCBlockCipherMac(new SkipjackEngine()));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:Skipjack.java


示例6: MacCFB8

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public MacCFB8()
{
    super(new CFBBlockCipherMac(new SkipjackEngine()));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:Skipjack.java


示例7: performTest

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public void performTest() 
    throws Exception
{
    byte[]  key1 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF };
    byte[]  key2 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF, (byte)0xee, (byte)0xff  };
    byte[]  iv = { 1, 2, 3, 4, 5, 6, 7, 8 };

    testCTS(1, new DESEngine(), new KeyParameter(key1), in1, out1);
    testCTS(2, new CBCBlockCipher(new DESEngine()), new ParametersWithIV(new KeyParameter(key1), iv), in1, out2);
    testCTS(3, new CBCBlockCipher(new SkipjackEngine()), new ParametersWithIV(new KeyParameter(key2), iv), in2, out3);

    //
    // test vectors from rfc3962
    //
    byte[] aes128 = Hex.decode("636869636b656e207465726979616b69");
    byte[] aesIn1  = Hex.decode("4920776f756c64206c696b652074686520");
    byte[] aesOut1 = Hex.decode("c6353568f2bf8cb4d8a580362da7ff7f97");
    byte[] aesIn2  = Hex.decode("4920776f756c64206c696b65207468652047656e6572616c20476175277320");
    byte[] aesOut2 = Hex.decode("fc00783e0efdb2c1d445d4c8eff7ed2297687268d6ecccc0c07b25e25ecfe5");
    byte[] aesIn3  = Hex.decode("4920776f756c64206c696b65207468652047656e6572616c2047617527732043");
    byte[] aesOut3 = Hex.decode("39312523a78662d5be7fcbcc98ebf5a897687268d6ecccc0c07b25e25ecfe584");

    testCTS(4, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn1, aesOut1);
    testCTS(5, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn2, aesOut2);
    testCTS(6, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn3, aesOut3);

    testOldCTS(4, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn1, aesOut1);
    testOldCTS(5, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn2, aesOut2);
    testOldCTS(6, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn3, aesOut3);

    byte[] aes1Block = Hex.decode("4920776f756c64206c696b6520746865");
    byte[] preErrata = Hex.decode("e7664c13ff28c965b0d2a0e7ec353706");   // CTS style one block
    byte[] pstErrata = Hex.decode("97687268d6ecccc0c07b25e25ecfe584");   // CBC style one block
    byte[] pstErrataNonZeroIV = Hex.decode("571f5108c53fe95ab52df783df933fa3");

    testCTS(7, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aes1Block, pstErrata);
    testCTS(8, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), aes1Block), aes1Block, pstErrataNonZeroIV);
    testOldCTS(9, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aes1Block, preErrata);

    byte[] aes128b = Hex.decode("aafd12f659cae63489b479e5076ddec2f06cb58faafd12f6");
    byte[] aesIn1b  = Hex.decode("000102030405060708090a0b0c0d0e0fff0102030405060708090a0b0c0d0e0f");
    byte[] aesOut1b = Hex.decode("6db2f802d99e1ef0a5940f306079e083cf87f4d8bb9d1abb36cdd9f44ead7d04");

    testCTS(10, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128b), Hex.decode("aafd12f659cae63489b479e5076ddec2")), aesIn1b, aesOut1b);

    testExceptions();
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:48,代码来源:CTSTest.java


示例8: SkipjackTest

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
SkipjackTest()
{
    super(tests, new SkipjackEngine(), new KeyParameter(Hex.decode("00998877665544332211")));
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:5,代码来源:SkipjackTest.java


示例9: performTest

import org.bouncycastle.crypto.engines.SkipjackEngine; //导入依赖的package包/类
public void performTest() 
    throws Exception
{
    byte[]  key1 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF };
    byte[]  key2 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF, (byte)0xee, (byte)0xff  };
    byte[]  iv = { 1, 2, 3, 4, 5, 6, 7, 8 };

    testCTS(1, new DESEngine(), new KeyParameter(key1), in1, out1);
    testCTS(2, new CBCBlockCipher(new DESEngine()), new ParametersWithIV(new KeyParameter(key1), iv), in1, out2);
    testCTS(3, new CBCBlockCipher(new SkipjackEngine()), new ParametersWithIV(new KeyParameter(key2), iv), in2, out3);

    //
    // test vectors from rfc3962
    //
    byte[] aes128 = Hex.decode("636869636b656e207465726979616b69");
    byte[] aesIn1  = Hex.decode("4920776f756c64206c696b652074686520");
    byte[] aesOut1 = Hex.decode("c6353568f2bf8cb4d8a580362da7ff7f97");
    byte[] aesIn2  = Hex.decode("4920776f756c64206c696b65207468652047656e6572616c20476175277320");
    byte[] aesOut2 = Hex.decode("fc00783e0efdb2c1d445d4c8eff7ed2297687268d6ecccc0c07b25e25ecfe5");
    byte[] aesIn3  = Hex.decode("4920776f756c64206c696b65207468652047656e6572616c2047617527732043");
    byte[] aesOut3 = Hex.decode("39312523a78662d5be7fcbcc98ebf5a897687268d6ecccc0c07b25e25ecfe584");

    testCTS(4, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn1, aesOut1);
    testCTS(5, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn2, aesOut2);
    testCTS(6, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn3, aesOut3);

    testOldCTS(4, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn1, aesOut1);
    testOldCTS(5, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn2, aesOut2);
    testOldCTS(6, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aesIn3, aesOut3);

    byte[] aes1Block = Hex.decode("4920776f756c64206c696b6520746865");
    byte[] preErrata = Hex.decode("e7664c13ff28c965b0d2a0e7ec353706");   // CTS style one block
    byte[] pstErrata = Hex.decode("97687268d6ecccc0c07b25e25ecfe584");   // CBC style one block
    byte[] pstErrataNonZeroIV = Hex.decode("571f5108c53fe95ab52df783df933fa3");

    testCTS(7, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aes1Block, pstErrata);
    testCTS(8, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), aes1Block), aes1Block, pstErrataNonZeroIV);
    testOldCTS(7, new CBCBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(aes128), new byte[16]), aes1Block, preErrata);

    testExceptions();
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:42,代码来源:CTSTest.java



注:本文中的org.bouncycastle.crypto.engines.SkipjackEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ConstraintSatisfactionAction类代码示例发布时间:2022-05-22
下一篇:
Java ArraySet类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap