block: Clean up the code used to generate and verify integrity metadata