本文整理汇总了Java中org.bouncycastle.util.Times类的典型用法代码示例。如果您正苦于以下问题:Java Times类的具体用法?Java Times怎么用?Java Times使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Times类属于org.bouncycastle.util包,在下文中一共展示了Times类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AbstractTlsContext
import org.bouncycastle.util.Times; //导入依赖的package包/类
AbstractTlsContext(SecureRandom secureRandom, SecurityParameters securityParameters)
{
Digest d = TlsUtils.createHash(HashAlgorithm.sha256);
byte[] seed = new byte[d.getDigestSize()];
secureRandom.nextBytes(seed);
this.nonceRandom = new DigestRandomGenerator(d);
nonceRandom.addSeedMaterial(nextCounterValue());
nonceRandom.addSeedMaterial(Times.nanoTime());
nonceRandom.addSeedMaterial(seed);
this.secureRandom = secureRandom;
this.securityParameters = securityParameters;
}
示例2: randomTests
import org.bouncycastle.util.Times; //导入依赖的package包/类
private void randomTests()
throws InvalidCipherTextException
{
SecureRandom srng = new SecureRandom();
srng.setSeed(Times.nanoTime());
for (int i = 0; i < 10; ++i)
{
randomTest(srng);
}
}
示例3: randomTests
import org.bouncycastle.util.Times; //导入依赖的package包/类
private void randomTests()
throws InvalidCipherTextException
{
SecureRandom srng = new SecureRandom();
srng.setSeed(Times.nanoTime());
randomTests(srng, null);
randomTests(srng, new BasicGCMMultiplier());
randomTests(srng, new Tables8kGCMMultiplier());
randomTests(srng, new Tables64kGCMMultiplier());
}