本文整理汇总了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);
}
示例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);
}
}
示例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;
}
示例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;
}