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*)&digest[0]);