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


Java HashSP800DRBG类代码示例

本文整理汇总了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);
}
 
开发者ID:cwgit,项目名称:ximix,代码行数:17,代码来源:SeededChallenger.java

示例2: get

import org.bouncycastle.crypto.prng.drbg.HashSP800DRBG; //导入依赖的package包/类
public SP80090DRBG get(EntropySource entropySource)
{
    return new HashSP800DRBG(digest, securityStrength, entropySource, personalizationString, nonce);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:SP800SecureRandomBuilder.java


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