本文整理汇总了Java中fr.cryptohash.SHA1类的典型用法代码示例。如果您正苦于以下问题:Java SHA1类的具体用法?Java SHA1怎么用?Java SHA1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SHA1类属于fr.cryptohash包,在下文中一共展示了SHA1类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSHA1
import fr.cryptohash.SHA1; //导入依赖的package包/类
/**
* Test SHA-1 implementation.
*/
private static void testSHA1()
{
Digest dig = new SHA1();
testKat(dig, "abc", "a9993e364706816aba3e25717850c26c9cd0d89d");
testKat(dig, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlm"
+ "nomnopnopq",
"84983e441c3bd26ebaae4aa1f95129e5e54670f1");
testKatMillionA(dig,
"34aa973cd4c4daa4f61eeb2bdbad27316534016f");
reportSuccess("SHA-1");
}
示例2: testSHA1
import fr.cryptohash.SHA1; //导入依赖的package包/类
@Test
public void testSHA1() {
Digest dig = new SHA1();
testKat(dig, "abc", "a9993e364706816aba3e25717850c26c9cd0d89d");
testKat(dig, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlm"
+ "nomnopnopq",
"84983e441c3bd26ebaae4aa1f95129e5e54670f1");
testKatMillionA(dig,
"34aa973cd4c4daa4f61eeb2bdbad27316534016f");
reportSuccess("SHA-1");
}