当前位置: 首页>>代码示例>>Java>>正文


Java GCMMultiplier类代码示例

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


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

示例1: runTestCase

import org.bouncycastle.crypto.modes.gcm.GCMMultiplier; //导入依赖的package包/类
private void runTestCase(
    GCMMultiplier   encM,
    GCMMultiplier   decM,
    String          testName,
    byte[]          K,
    byte[]          IV,
    byte[]          A,
    byte[]          P,
    byte[]          C,
    byte[]          T)
    throws InvalidCipherTextException
{
    byte[] fa = new byte[A.length / 2];
    byte[] la = new byte[A.length - (A.length / 2)];
    System.arraycopy(A, 0, fa, 0, fa.length);
    System.arraycopy(A, fa.length, la, 0, la.length);

    runTestCase(encM, decM, testName + " all initial associated data", K, IV, A, null, P, C, T);
    runTestCase(encM, decM, testName + " all subsequent associated data", K, IV, null, A, P, C, T);
    runTestCase(encM, decM, testName + " split associated data", K, IV, fa, la, P, C, T);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:22,代码来源:GCMTest.java

示例2: randomTests

import org.bouncycastle.crypto.modes.gcm.GCMMultiplier; //导入依赖的package包/类
private void randomTests(SecureRandom srng, GCMMultiplier m)
    throws InvalidCipherTextException
{
    for (int i = 0; i < 10; ++i)
    {
        randomTest(srng, m);
    }
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:9,代码来源:GCMTest.java

示例3: initCipher

import org.bouncycastle.crypto.modes.gcm.GCMMultiplier; //导入依赖的package包/类
private GCMBlockCipher initCipher(GCMMultiplier m, boolean forEncryption, AEADParameters parameters)
{
    GCMBlockCipher c = new GCMBlockCipher(createAESEngine(), m);
    c.init(forEncryption, parameters);
    return c;
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:7,代码来源:GCMTest.java

示例4: initCipher

import org.bouncycastle.crypto.modes.gcm.GCMMultiplier; //导入依赖的package包/类
private GCMBlockCipher initCipher(GCMMultiplier m, boolean forEncryption, AEADParameters parameters)
{
    GCMBlockCipher c = new GCMBlockCipher(new AESFastEngine(), m);
    c.init(forEncryption, parameters);
    return c;
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:7,代码来源:GCMTest.java


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