C++ Crypto:Part 3-pbkdf2
void hash(std::string const&amp; password, std::string const&amp; salt, long iter, DigestStore&amp; digest)
...
for (int loop = 1; loop &lt; iter; ++loop)
        ...
        for (std::size_t loop = 0; loop &lt; digestSize; ++loop)

&quot;A long an int and a std::size_t all walked into a bar...&quot; couldn't they all be std::size_t?
Also, overriding the loop variable is unnecessarily confusing.

    std::copy(std::begin(tmp), std::end(tmp), std::begin(digest));

I feel like this could just be digest = tmp; with an appropriate assignment operator.

salt + &quot;\x00\x00\x00\x01&quot;s

Could this be a named constant (or even a named function)? Or maybe add a comment to explain why this is here.

            digest[loop] = digest[loop] ^ tmp[loop];

Nitpick: could use ^=

Perhaps the output should be a return value, not written to a reference?

I don't know enough about cryptography / security to assess the algorithm / safety aspects of this.