本文整理汇总了Java中org.bouncycastle.crypto.prng.drbg.HashSP800DRBG类的典型用法代码示例。如果您正苦于以下问题:Java HashSP800DRBG类的具体用法?Java HashSP800DRBG怎么用?Java HashSP800DRBG使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HashSP800DRBG类属于org.bouncycastle.crypto.prng.drbg包,在下文中一共展示了HashSP800DRBG类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SeededChallenger
import org.bouncycastle.crypto.prng.drbg.HashSP800DRBG; //导入依赖的package包/类
/**
* Base constructor.
*
* @param size the number of messages on the board we are issuing challenges on.
* @param stepNo the number of the step in the shuffling process.
* @param seed a random seed for creating index numbers to challenge on - must be at least 55 bytes.
*/
public SeededChallenger(Integer size, Integer stepNo, byte[] seed)
{
this.counter = 0;
this.startIndex = 0;
this.bitSet = buildBitSet(size, new HashSP800DRBG(new SHA256Digest(), 256, new SingleEntropySourceProvider(seed).get(440), null, null));
this.isMirror = (((seed[seed.length - 1] & 0xff) + stepNo) & 0x01) == 0;
this.max = (isMirror) ? (size - (size / 2)) : (size / 2);
}
示例2: get
import org.bouncycastle.crypto.prng.drbg.HashSP800DRBG; //导入依赖的package包/类
public SP80090DRBG get(EntropySource entropySource)
{
return new HashSP800DRBG(digest, securityStrength, entropySource, personalizationString, nonce);
}