Added hash function

Added function to calculate a file's hash