Skip to content

Commit

Permalink
lib/sodium/SHA256: rename SHA256Digest to SHA256DigestBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Oct 26, 2023
1 parent 1b88bbe commit b8ade82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/sodium/SHA256.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <span>
#include <string_view>

using SHA256Digest = std::array<std::byte, crypto_hash_sha256_BYTES>;
using SHA256DigestBuffer = std::array<std::byte, crypto_hash_sha256_BYTES>;
using SHA256DigestView = std::span<const std::byte, crypto_hash_sha256_BYTES>;

class SHA256State {
Expand Down Expand Up @@ -47,7 +47,7 @@ public:
}

auto Final() noexcept {
SHA256Digest out;
SHA256DigestBuffer out;
Final(out);
return out;
}
Expand All @@ -57,7 +57,7 @@ public:
inline auto
SHA256(std::span<const std::byte> src) noexcept
{
SHA256Digest out;
SHA256DigestBuffer out;
crypto_hash_sha256(reinterpret_cast<unsigned char *>(out.data()),
reinterpret_cast<const unsigned char *>(src.data()),
src.size());
Expand Down

0 comments on commit b8ade82

Please sign in to comment.