Skip to content

Commit

Permalink
Fix memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Nov 4, 2024
1 parent 113fb36 commit 17a616b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/boost/crypt/hash/hmac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,9 @@ constexpr auto hmac<HasherType>::init(ForwardIter key, boost::crypt::size_t size

BOOST_CRYPT_ASSERT(res.size() <= k0.size());

auto key_iter {res.begin()};
for (auto& byte : k0)
for (boost::crypt::size_t i {}; i < res.size(); ++i)
{
byte = *key_iter++;
k0[i] = res[i];
}
}

Expand Down

0 comments on commit 17a616b

Please sign in to comment.