MCPcopy Create free account
hub / github.com/ElementsProject/elements / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

src/test/crypto_tests.cpp:207–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205const std::string test1 = LongTestString();
206
207BOOST_AUTO_TEST_CASE(ripemd160_testvectors) {
208 TestRIPEMD160("", "9c1185a5c5e9fc54612808977ee8f548b2258d31");
209 TestRIPEMD160("abc", "8eb208f7e05d987a9b044a8e98c6b087f15a0bfc");
210 TestRIPEMD160("message digest", "5d0689ef49d2fae572b881b123a85ffa21595f36");
211 TestRIPEMD160("secure hash algorithm", "20397528223b6a5f4cbc2808aba0464e645544f9");
212 TestRIPEMD160("RIPEMD160 is considered to be safe", "a7d78608c7af8a8e728778e81576870734122b66");
213 TestRIPEMD160("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
214 "12a053384a9c0c88e405a06c27dcf49ada62eb2b");
215 TestRIPEMD160("For this sample, this 63-byte string will be used as input data",
216 "de90dbfee14b63fb5abf27c2ad4a82aaa5f27a11");
217 TestRIPEMD160("This is exactly 64 bytes long, not counting the terminating byte",
218 "eda31d51d3a623b81e19eb02e24ff65d27d67b37");
219 TestRIPEMD160(std::string(1000000, 'a'), "52783243c1697bdbe16d37f97f68f08325dc1528");
220 TestRIPEMD160(test1, "464243587bd146ea835cdf57bdae582f25ec45f1");
221}
222
223BOOST_AUTO_TEST_CASE(sha1_testvectors) {
224 TestSHA1("", "da39a3ee5e6b4b0d3255bfef95601890afd80709");

Callers

nothing calls this directly

Calls 15

TestRIPEMD160Function · 0.85
TestSHA1Function · 0.85
TestSHA256Function · 0.85
TestSHA512Function · 0.85
TestHMACSHA256Function · 0.85
TestHMACSHA512Function · 0.85
TestAES256Function · 0.85
TestAES256CBCFunction · 0.85
TestChaCha20Function · 0.85
TestPoly1305Function · 0.85
TestHKDF_SHA256_32Function · 0.85
TestChaCha20Poly1305AEADFunction · 0.85

Tested by

no test coverage detected