diff options
author | chai <chaifix@163.com> | 2021-10-29 18:48:10 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-29 18:48:10 +0800 |
commit | 2381fe08be1a0c99d9541761b85064b8ece3f253 (patch) | |
tree | 5f04464b7c2ebf3d718b61e959d23f903dd4c6b0 /ThirdParty/hash-library/tests/github-issue6.cpp | |
parent | 796b4b05ec62eb5d58a634854998f485072e8a2b (diff) |
+md5
Diffstat (limited to 'ThirdParty/hash-library/tests/github-issue6.cpp')
-rw-r--r-- | ThirdParty/hash-library/tests/github-issue6.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ThirdParty/hash-library/tests/github-issue6.cpp b/ThirdParty/hash-library/tests/github-issue6.cpp new file mode 100644 index 0000000..e303959 --- /dev/null +++ b/ThirdParty/hash-library/tests/github-issue6.cpp @@ -0,0 +1,16 @@ +// minimal test case for https://github.com/stbrumme/hash-library/issues/6 +// g++ github-issue6.cpp ../sha3.cpp -o github-issue6 && ./github-issue6 + +#include "../sha3.h" +#include <iostream> + +int main(int argc, char *argv[]) +{ + std::string text = "72a5f501151ca974002f34"; + + SHA3 hasher(SHA3::Bits512); + hasher.add(text.data(), text.size()); + std::cout << hasher.getHash() << std::endl; + + return 0; +} |