Skip to content

Commit

Permalink
Merge pull request #16 from cmazakas/fix/sha2-sizetype
Browse files Browse the repository at this point in the history
fix size_type in sha2 functions
  • Loading branch information
pdimov authored Oct 18, 2024
2 parents 5929c6b + 6a601ea commit 6910f0c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/boost/hash2/sha2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class sha2_224 : detail::sha2_256_base

public:
using result_type = std::array<unsigned char, 28>;
using size_type = std::size_t;
using size_type = std::uint64_t;

static int const block_size = 64;

Expand Down Expand Up @@ -468,7 +468,8 @@ class sha2_512 : detail::sha2_512_base
public:

using result_type = std::array<unsigned char, 64>;
using size_type = std::size_t;
using size_type = std::uint64_t;

using detail::sha2_512_base::update;

static int const block_size = 128;
Expand Down Expand Up @@ -545,7 +546,7 @@ class sha2_384 : detail::sha2_512_base
public:

using result_type = std::array<unsigned char, 48>;
using size_type = std::size_t;
using size_type = std::uint64_t;

static int const block_size = 128;

Expand Down Expand Up @@ -623,7 +624,7 @@ class sha2_512_224 : detail::sha2_512_base
public:

using result_type = std::array<unsigned char, 28>;
using size_type = std::size_t;
using size_type = std::uint64_t;

static int const block_size = 128;

Expand Down Expand Up @@ -702,7 +703,7 @@ class sha2_512_256 : detail::sha2_512_base
public:

using result_type = std::array<unsigned char, 32>;
using size_type = std::size_t;
using size_type = std::uint64_t;

static int const block_size = 128;

Expand Down

0 comments on commit 6910f0c

Please sign in to comment.