Skip to content

Commit

Permalink
Merge pull request #11 from cmazakas/feature/hmac-sha512
Browse files Browse the repository at this point in the history
add hmac-sha512
  • Loading branch information
pdimov authored Oct 11, 2024
2 parents f49215d + 2e414fa commit 965b3d7
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
21 changes: 21 additions & 0 deletions include/boost/hash2/sha2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,11 @@ class sha2_512 : detail::sha2_512_base
public:

using result_type = std::array<unsigned char, 64>;
using size_type = std::size_t;
using detail::sha2_512_base::update;

static int const block_size = 128;

sha2_512()
{
init();
Expand Down Expand Up @@ -627,6 +630,24 @@ class hmac_sha2_224: public hmac<sha2_224>
}
};

class hmac_sha2_512: public hmac<sha2_512>
{
public:

hmac_sha2_512()
{
}

explicit hmac_sha2_512( std::uint64_t seed ): hmac<sha2_512>( seed )
{
}

hmac_sha2_512( unsigned char const * p, std::size_t n ): hmac<sha2_512>( p, n )
{
}
};


} // namespace hash2
} // namespace boost

Expand Down
Loading

0 comments on commit 965b3d7

Please sign in to comment.