verifyIntegrity function
Verify that a module matches the expected integrity hash.
Returns true if the hash matches, false otherwise.
If expected is empty, always returns true (no verification requested).
Implementation
bool verifyIntegrity(Module module, String expected) {
if (expected.isEmpty) return true;
return computeIntegrity(module) == expected;
}