本文整理汇总了Java中org.bouncycastle.crypto.digests.GeneralDigest类的典型用法代码示例。如果您正苦于以下问题:Java GeneralDigest类的具体用法?Java GeneralDigest怎么用?Java GeneralDigest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeneralDigest类属于org.bouncycastle.crypto.digests包,在下文中一共展示了GeneralDigest类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hash
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
private byte[] hash(byte[] input)
{
GeneralDigest digest = new SHA256Digest();
digest.update(input, 0, input.length);
byte[] buffer = new byte[digest.getDigestSize()];
digest.doFinal(buffer, 0);
Arrays.fill(input, (byte) 0);
return buffer;
}
示例2: hashUp
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
public byte[] hashUp(byte[] input)
{
GeneralDigest d = new SHA1Digest();
d.update(input, 0, input.length);
byte[] b = new byte[d.getDigestSize()];
d.doFinal(b, 0);
return b;
}
示例3: DIGEST
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
public DIGEST(String name, Class<? extends GeneralDigest> digestAlgo) {
super(name);
this.digestAlgo = digestAlgo;
}
示例4: HMAC
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
public HMAC(String name, Class<? extends GeneralDigest> digestAlgo) {
super(name);
this.digestAlgo = digestAlgo;
}
示例5: SnapshotDirectory
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
SnapshotDirectory(Path folder, GeneralDigest digest) {
this.folder = folder;
this.digest = digest;
}
示例6: FileDecrypter
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
FileDecrypter(BufferedBlockCipher cbcAes, GeneralDigest digest) {
this.cbcAes = cbcAes;
this.digest = digest;
}
示例7: ChunkDecrypter
import org.bouncycastle.crypto.digests.GeneralDigest; //导入依赖的package包/类
ChunkDecrypter(StreamBlockCipher cfbAes, GeneralDigest digest) {
this.cfbAes = Objects.requireNonNull(cfbAes);
this.digest = Objects.requireNonNull(digest);
}