Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Oct 24, 2024
1 parent e9d265a commit 828e1af
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions test/test_sha512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <ctime>
#include <cstring>

constexpr std::array<std::tuple<const char*, boost::crypt::sha512_hasher::return_type>, 1> test_values =
constexpr std::array<std::tuple<const char*, boost::crypt::sha512_hasher::return_type>, 3> test_values =
{
std::make_tuple("",
boost::crypt::sha512_hasher::return_type {
Expand All @@ -27,7 +27,29 @@ constexpr std::array<std::tuple<const char*, boost::crypt::sha512_hasher::return
0xff, 0x83, 0x18, 0xd2, 0x87, 0x7e, 0xec, 0x2f,
0x63, 0xb9, 0x31, 0xbd, 0x47, 0x41, 0x7a, 0x81,
0xa5, 0x38, 0x32, 0x7a, 0xf9, 0x27, 0xda, 0x3e
})
}),
std::make_tuple("The quick brown fox jumps over the lazy dog",
boost::crypt::sha512_hasher::return_type {
0x07, 0xe5, 0x47, 0xd9, 0x58, 0x6f, 0x6a, 0x73,
0xf7, 0x3f, 0xba, 0xc0, 0x43, 0x5e, 0xd7, 0x69,
0x51, 0x21, 0x8f, 0xb7, 0xd0, 0xc8, 0xd7, 0x88,
0xa3, 0x09, 0xd7, 0x85, 0x43, 0x6b, 0xbb, 0x64,
0x2e, 0x93, 0xa2, 0x52, 0xa9, 0x54, 0xf2, 0x39,
0x12, 0x54, 0x7d, 0x1e, 0x8a, 0x3b, 0x5e, 0xd6,
0xe1, 0xbf, 0xd7, 0x09, 0x78, 0x21, 0x23, 0x3f,
0xa0, 0x53, 0x8f, 0x3d, 0xb8, 0x54, 0xfe, 0xe6
}),
std::make_tuple("The quick brown fox jumps over the lazy dog.",
boost::crypt::sha512_hasher::return_type {
0x91, 0xea, 0x12, 0x45, 0xf2, 0x0d, 0x46, 0xae,
0x9a, 0x03, 0x7a, 0x98, 0x9f, 0x54, 0xf1, 0xf7,
0x90, 0xf0, 0xa4, 0x76, 0x07, 0xee, 0xb8, 0xa1,
0x4d, 0x12, 0x89, 0x0c, 0xea, 0x77, 0xa1, 0xbb,
0xc6, 0xc7, 0xed, 0x9c, 0xf2, 0x05, 0xe6, 0x7b,
0x7f, 0x2b, 0x8f, 0xd4, 0xc7, 0xdf, 0xd3, 0xa7,
0xa8, 0x61, 0x7e, 0x45, 0xf3, 0xc4, 0x63, 0xd4,
0x81, 0xc7, 0xe5, 0x86, 0xc3, 0x9a, 0xc1, 0xed
}),
};

void basic_tests()
Expand Down

0 comments on commit 828e1af

Please sign in to comment.