get hash for a file
update hash function