Utilities for calculating checksums on the fly