verifyIntegrityFromBytes function
Verify that raw bytes match the expected integrity hash.
Implementation
bool verifyIntegrityFromBytes(List<int> bytes, String expected) {
if (expected.isEmpty) return true;
return computeIntegrityFromBytes(bytes) == expected;
}