本文整理汇总了Java中org.bouncycastle.crypto.digests.WhirlpoolDigest类的典型用法代码示例。如果您正苦于以下问题:Java WhirlpoolDigest类的具体用法?Java WhirlpoolDigest怎么用?Java WhirlpoolDigest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WhirlpoolDigest类属于org.bouncycastle.crypto.digests包,在下文中一共展示了WhirlpoolDigest类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clone
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
public Object clone()
throws CloneNotSupportedException
{
Digest d = (Digest)super.clone();
d.digest = new WhirlpoolDigest((WhirlpoolDigest)digest);
return d;
}
示例2: createHexOutputFromDigest
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
private String createHexOutputFromDigest(byte[] digestBytes)
{
String resStr;
Digest digest = new WhirlpoolDigest();
byte[] resBuf = new byte[digest.getDigestSize()];
digest.update(digestBytes, 0, digestBytes.length);
digest.doFinal(resBuf, 0);
resStr = new String(Hex.encode(resBuf));
return resStr;
}
示例3: initDigesters
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
private static void initDigesters() {
digesters.put("Blake2b", Blake2bDigest.class);
digesters.put("GOST3411", GOST3411Digest.class);
digesters.put("Keccak", KeccakDigest.class);
digesters.put("MD2", MD2Digest.class);
digesters.put("MD4", MD4Digest.class);
digesters.put("MD5", MD5Digest.class);
digesters.put("RIPEMD128", RIPEMD128Digest.class);
digesters.put("RIPEMD160", RIPEMD160Digest.class);
digesters.put("RIPEMD256", RIPEMD256Digest.class);
digesters.put("RIPEMD320", RIPEMD320Digest.class);
digesters.put("SHA1", SHA1Digest.class);
digesters.put("SHA224", SHA224Digest.class);
digesters.put("SHA256", SHA256Digest.class);
digesters.put("SHA384", SHA384Digest.class);
digesters.put("SHA3-512", SHA3Digest.class);
digesters.put("SHA3-256", SHA3Digest.class);
digesters.put("SHA3-224", SHA3Digest.class);
digesters.put("SHA3-384", SHA3Digest.class);
digesters.put("SHA512", SHA512Digest.class);
digesters.put("SHAKE-128", SHAKEDigest.class);
digesters.put("SHAKE-256", SHAKEDigest.class);
digesters.put("Skein256", SkeinDigest.class);
digesters.put("Skein512", SkeinDigest.class);
digesters.put("Skein1024", SkeinDigest.class);
digesters.put("SM3", SM3Digest.class);
digesters.put("Tiger", TigerDigest.class);
digesters.put("Whirlpool", WhirlpoolDigest.class);
}
示例4: Whirlpool
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
/**
* Creates a new Whirlpool digest that may optionally be initialized with
* random data.
*
* @param randomize
* True to randomize initial state of digest, false otherwise.
*/
public Whirlpool(final boolean randomize) {
super(new WhirlpoolDigest());
if (randomize) {
setRandomProvider(new SecureRandom());
setSalt(getRandomSalt());
}
}
示例5: Digest
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
public Digest()
{
super(new WhirlpoolDigest());
}
示例6: HashMac
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
public HashMac()
{
super(new HMac(new WhirlpoolDigest()));
}
示例7: WhirlpoolDigestTest
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
WhirlpoolDigestTest()
{
super(new WhirlpoolDigest(), messages, digests);
}
示例8: cloneDigest
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
protected Digest cloneDigest(Digest digest)
{
return new WhirlpoolDigest((WhirlpoolDigest)digest);
}
示例9: WhirlpoolWithRSAEncryption
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
public WhirlpoolWithRSAEncryption()
{
super(new WhirlpoolDigest(), new RSABlindedEngine());
}
示例10: register
import org.bouncycastle.crypto.digests.WhirlpoolDigest; //导入依赖的package包/类
public static final void register(final Map<String, Hasher> hashers) {
hashers.put(BouncyCastleHasher.GOST,
new BouncyCastleHasher(new GOST3411Digest()));
hashers.put(BouncyCastleHasher.MD2,
new BouncyCastleHasher(new MD2Digest()));
hashers.put(BouncyCastleHasher.MD4,
new BouncyCastleHasher(new MD4Digest()));
hashers.put(BouncyCastleHasher.MD5,
new BouncyCastleHasher(new MD5Digest()));
hashers.put(BouncyCastleHasher.RIPEMD128,
new BouncyCastleHasher(new RIPEMD128Digest()));
hashers.put(BouncyCastleHasher.RIPEMD160,
new BouncyCastleHasher(new RIPEMD160Digest()));
hashers.put(BouncyCastleHasher.RIPEMD256,
new BouncyCastleHasher(new RIPEMD256Digest()));
hashers.put(BouncyCastleHasher.RIPEMD320,
new BouncyCastleHasher(new RIPEMD320Digest()));
hashers.put(BouncyCastleHasher.SHA1,
new BouncyCastleHasher(new SHA1Digest()));
hashers.put(BouncyCastleHasher.SHA224,
new BouncyCastleHasher(new SHA224Digest()));
hashers.put(BouncyCastleHasher.SHA256,
new BouncyCastleHasher(new SHA256Digest()));
hashers.put(BouncyCastleHasher.SHA3,
new BouncyCastleHasher(new SHA3Digest()));
hashers.put(BouncyCastleHasher.SHA384,
new BouncyCastleHasher(new SHA384Digest()));
hashers.put(BouncyCastleHasher.SHA512,
new BouncyCastleHasher(new SHA512Digest()));
hashers.put(BouncyCastleHasher.SHA512_T,
new BouncyCastleHasher(new SHA512tDigest(7 * 8)));
hashers.put(BouncyCastleHasher.SKEIN1024, new BouncyCastleHasher(
new SkeinDigest(SkeinDigest.SKEIN_1024, Long.BYTES * 8)));
hashers.put(BouncyCastleHasher.SKEIN256, new BouncyCastleHasher(
new SkeinDigest(SkeinDigest.SKEIN_256, Long.BYTES * 8)));
hashers.put(BouncyCastleHasher.SKEIN512, new BouncyCastleHasher(
new SkeinDigest(SkeinDigest.SKEIN_512, Long.BYTES * 8)));
hashers.put(BouncyCastleHasher.SM3,
new BouncyCastleHasher(new SM3Digest()));
hashers.put(BouncyCastleHasher.TIGER,
new BouncyCastleHasher(new TigerDigest()));
hashers.put(BouncyCastleHasher.WHIRLPOOL2,
new BouncyCastleHasher(new WhirlpoolDigest()));
}