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


Java SHA0类代码示例

本文整理汇总了Java中fr.cryptohash.SHA0的典型用法代码示例。如果您正苦于以下问题:Java SHA0类的具体用法?Java SHA0怎么用?Java SHA0使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SHA0类属于fr.cryptohash包,在下文中一共展示了SHA0类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSHA0

import fr.cryptohash.SHA0; //导入依赖的package包/类
/**
 * Test SHA-0 implementation.
 */
private static void testSHA0()
{
	Digest dig = new SHA0();
	testKat(dig, "abc", "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880");
	testKat(dig, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlm"
		+ "nomnopnopq",
		"d2516ee1acfa5baf33dfc1c471e438449ef134c8");

	testKatMillionA(dig,
		"3232affa48628a26653b5aaa44541fd90d690603");

	testCollision(dig,
		"a766a602b65cffe773bcf25826b322b3d01b1a972684ef533e"
		+ "3b4b7f53fe376224c08e47e959b2bc3b519880b928656824"
		+ "7d110f70f5c5e2b4590ca3f55f52feeffd4c8fe68de83532"
		+ "9e603cc51e7f02545410d1671d108df5a4000dcf20a43949"
		+ "49d72cd14fbb0345cf3a295dcda89f998f87552c9a58b1bd"
		+ "c384835e477185f96e68bebb0025d2d2b69edf21724198f6"
		+ "88b41deb9b4913fbe696b5457ab39921e1d7591f89de8457"
		+ "e8613c6c9e3b242879d4d8783b2d9ca9935ea526a729c06e"
		+ "dfc50137e69330be976012cc5dfe1c14c4c68bd1db3ecb24"
		+ "438a59a09b5db435563e0d8bdf572f77b53065cef31f32dc"
		+ "9dbaa04146261e9994bd5cd0758e3d",
		"a766a602b65cffe773bcf25826b322b1d01b1ad72684ef51be"
		+ "3b4b7fd3fe3762a4c08e45e959b2fc3b51988039286528a4"
		+ "7d110d70f5c5e034590ce3755f52fc6ffd4c8d668de87532"
		+ "9e603e451e7f02d45410d1e71d108df5a4000dcf20a43949"
		+ "49d72cd14fbb0145cf3a695dcda89d198f8755ac9a58b13d"
		+ "c384815e4771c5796e68febb0025d052b69edda17241d876"
		+ "88b41f6b9b49117be696f5c57ab399a1e1d7199f89de8657"
		+ "e8613cec9e3b26a879d498783b2d9e29935ea7a6a729806e"
		+ "dfc50337e693303e9760104c5dfe5c14c4c68951db3ecba4"
		+ "438a59209b5db435563e0d8bdf572f77b53065cef31f30dc"
		+ "9dbae04146261c1994bd5c50758e3d");

	reportSuccess("SHA-0");
}
 
开发者ID:muhatzg,项目名称:burstcoin,代码行数:41,代码来源:TestDigest.java

示例2: testSHA0

import fr.cryptohash.SHA0; //导入依赖的package包/类
@Test
public void testSHA0() {
    Digest dig = new SHA0();
    testKat(dig, "abc", "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880");
    testKat(dig, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlm"
            + "nomnopnopq",
            "d2516ee1acfa5baf33dfc1c471e438449ef134c8");

    testKatMillionA(dig,
            "3232affa48628a26653b5aaa44541fd90d690603");

    testCollision(dig,
            "a766a602b65cffe773bcf25826b322b3d01b1a972684ef533e"
                    + "3b4b7f53fe376224c08e47e959b2bc3b519880b928656824"
                    + "7d110f70f5c5e2b4590ca3f55f52feeffd4c8fe68de83532"
                    + "9e603cc51e7f02545410d1671d108df5a4000dcf20a43949"
                    + "49d72cd14fbb0345cf3a295dcda89f998f87552c9a58b1bd"
                    + "c384835e477185f96e68bebb0025d2d2b69edf21724198f6"
                    + "88b41deb9b4913fbe696b5457ab39921e1d7591f89de8457"
                    + "e8613c6c9e3b242879d4d8783b2d9ca9935ea526a729c06e"
                    + "dfc50137e69330be976012cc5dfe1c14c4c68bd1db3ecb24"
                    + "438a59a09b5db435563e0d8bdf572f77b53065cef31f32dc"
                    + "9dbaa04146261e9994bd5cd0758e3d",
            "a766a602b65cffe773bcf25826b322b1d01b1ad72684ef51be"
                    + "3b4b7fd3fe3762a4c08e45e959b2fc3b51988039286528a4"
                    + "7d110d70f5c5e034590ce3755f52fc6ffd4c8d668de87532"
                    + "9e603e451e7f02d45410d1e71d108df5a4000dcf20a43949"
                    + "49d72cd14fbb0145cf3a695dcda89d198f8755ac9a58b13d"
                    + "c384815e4771c5796e68febb0025d052b69edda17241d876"
                    + "88b41f6b9b49117be696f5c57ab399a1e1d7199f89de8657"
                    + "e8613cec9e3b26a879d498783b2d9e29935ea7a6a729806e"
                    + "dfc50337e693303e9760104c5dfe5c14c4c68951db3ecba4"
                    + "438a59209b5db435563e0d8bdf572f77b53065cef31f30dc"
                    + "9dbae04146261c1994bd5c50758e3d");

    reportSuccess("SHA-0");
}
 
开发者ID:jnorthrup,项目名称:sphlib,代码行数:38,代码来源:SHA0Test.java


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