sha1 of string content depends on source type
Calculating the SHA1 with
osha1 << "abc";
osha1 << std::string("abc");
Yields different values due to addition of quotes. However these quotes are simply collateral from the OpenFOAM OSStream (OPstream doesn't need them). They should not form part of the SHA1.