verifyIntegrityFromBytes function

bool verifyIntegrityFromBytes(
  1. List<int> bytes,
  2. String expected
)

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;
}