Meson instead of Make

This commit is contained in:
2026-01-13 13:08:46 +03:00
parent 2cd45c0750
commit bae33de997
22 changed files with 239 additions and 448 deletions

18
test/hash/sha256.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <basen/hash/sha256.hpp>
#include <basen/hex.hpp>
#include <gtest/gtest.h>
using namespace hash;
TEST(hash, sha256)
{
EXPECT_EQ(hex::encode(sha256(hex::decode("1234"))), "3a103a4e5729ad68c02a678ae39accfbc0ae208096437401b7ceab63cca0622f");
}
TEST(hash, sha256_1e4)
{
std::vector<uint8_t> data(32);
for (size_t i = 0; i < 1e4; i++)
{
sha256(data);
}
}