diff options
Diffstat (limited to 'tests/test_sha256.cc')
-rw-r--r-- | tests/test_sha256.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_sha256.cc b/tests/test_sha256.cc new file mode 100644 index 0000000..a9ab7ad --- /dev/null +++ b/tests/test_sha256.cc @@ -0,0 +1,10 @@ +#define CATCH_CONFIG_MAIN +#include "catch.hpp" +#include "sha256.h" + +TEST_CASE("SHA256 digest", "[format]") { + auto sha = hmacsha256::SHA256("hello, world"); + sha.digest(); + + REQUIRE(sha.hexdigest() == "09ca7e4eaa6e8ae9c7d261167129184883644d07dfba7cbfbc4c8a2e08360d5b"); +} |