本文整理匯總了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());
}