summaryrefslogtreecommitdiff
path: root/tests/test_sha256.cc
blob: 4860a7376b94177961c84c6e7d3c7e4c442b1566 (plain)
1
2
3
4
5
6
7
8
9
10
11
#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");
}