On Wed, Feb 2, 2022 at 12:19 PM Devharsh Trivedi
wrote:
>
> I am trying to calculate SHA256 digest for entire string vector like this:
>
> byte digest[SHA256::DIGESTSIZE];
> SHA256().CalculateDigest(digest, (const byte*)stringVector.data(),
> stringVector.size());
>
> What is the correct way to c
I am using hash.Update to iterate over a vector to calculate the hash of
the container. Is there a better way to do this?
std::string digest;
SHA256 hash;
for(auto str: stringVector) {
hash.Update((const byte*)str.data(), str.size());
}
digest.resize(hash.DigestSize());
hash.Final((byte*)&d
I am trying to calculate SHA256 digest for entire string vector like this:
byte digest[SHA256::DIGESTSIZE];
SHA256().CalculateDigest(digest, (const byte*)stringVector.data(),
stringVector.size());
What is the correct way to calculate hash of entire vector?
--
You received this message because