-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hash functions as a tool to generate serialization ids or just
hash objects during compile time.
- Loading branch information
Showing
4 changed files
with
969 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "test.h" | ||
|
||
namespace test_hash | ||
{ | ||
using namespace zpp::bits::literals; | ||
using namespace std::literals; | ||
|
||
static_assert(""_sha1 == | ||
"da39a3ee5e6b4b0d3255bfef95601890afd80709"_unhexlify); | ||
static_assert( | ||
""_sha256 == | ||
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"_unhexlify); | ||
|
||
static_assert("The quick brown fox jumps over the lazy dog"_sha1 == | ||
"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"_unhexlify); | ||
|
||
static_assert( | ||
"The quick brown fox jumps over the lazy dog"_sha256 == | ||
"d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"_unhexlify); | ||
} // namespace test_hash |
Oops, something went wrong.