本文整理汇总了Java中fr.cryptohash.MD2类的典型用法代码示例。如果您正苦于以下问题:Java MD2类的具体用法?Java MD2怎么用?Java MD2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MD2类属于fr.cryptohash包,在下文中一共展示了MD2类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testMD2
import fr.cryptohash.MD2; //导入依赖的package包/类
/**
* Test MD2 implementation.
*/
private static void testMD2()
{
Digest dig = new MD2();
testKat(dig, "", "8350e5a3e24c153df2275c9f80692773");
testKat(dig, "a", "32ec01ec4a6dac72c0ab96fb34c0b5d1");
testKat(dig, "abc", "da853b0d3f88d99b30283a69e6ded6bb");
testKat(dig, "message digest",
"ab4f496bfb2a530b219ff33031fe06b0");
testKat(dig, "abcdefghijklmnopqrstuvwxyz",
"4e8ddff3650292ab5a4108c3aa47940b");
testKat(dig, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu"
+ "vwxyz0123456789",
"da33def2a42df13975352846c30338cd");
testKat(dig, "1234567890123456789012345678901234567890123456789"
+ "0123456789012345678901234567890",
"d5976f79d83d3a0dc9806c3c66f3efd8");
testKatMillionA(dig, "8c0a09ff1216ecaf95c8130953c62efd");
reportSuccess("MD2");
}
示例2: testMD2
import fr.cryptohash.MD2; //导入依赖的package包/类
@Test
public void testMD2() {
Digest dig = new MD2();
testKat(dig, "", "8350e5a3e24c153df2275c9f80692773");
testKat(dig, "a", "32ec01ec4a6dac72c0ab96fb34c0b5d1");
testKat(dig, "abc", "da853b0d3f88d99b30283a69e6ded6bb");
testKat(dig, "message digest",
"ab4f496bfb2a530b219ff33031fe06b0");
testKat(dig, "abcdefghijklmnopqrstuvwxyz",
"4e8ddff3650292ab5a4108c3aa47940b");
testKat(dig, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu"
+ "vwxyz0123456789",
"da33def2a42df13975352846c30338cd");
testKat(dig, "1234567890123456789012345678901234567890123456789"
+ "0123456789012345678901234567890",
"d5976f79d83d3a0dc9806c3c66f3efd8");
testKatMillionA(dig, "8c0a09ff1216ecaf95c8130953c62efd");
reportSuccess("MD2");
}