diff --git a/include/basen/hash/sha256.hpp b/include/basen/hash/sha256.hpp index 9703997..279ecb5 100644 --- a/include/basen/hash/sha256.hpp +++ b/include/basen/hash/sha256.hpp @@ -4,9 +4,8 @@ #include #include -#define SHA256_DIGEST_LENGTH 32 - -namespace hash { +namespace hash +{ void sha256(const uint8_t *data, uint64_t data_size, uint8_t *hash) noexcept; std::vector sha256(std::span data) noexcept; } \ No newline at end of file diff --git a/src/hash/sha256.cpp b/src/hash/sha256.cpp index 63ad5df..32d2b14 100644 --- a/src/hash/sha256.cpp +++ b/src/hash/sha256.cpp @@ -174,7 +174,7 @@ namespace hash } std::vector sha256(std::span data) noexcept { - std::vector hash(SHA256_DIGEST_LENGTH); + std::vector hash(32); sha256(data.data(), data.size(), hash.data()); return hash; }