Read files in chunks to avoid OOM scenarios for large files.

The hash implementation originally read the entire file into memory which can lead to out of memory errors for large files.  Instead, read the file in chunks and update the hash iteratively.