generate sha1 hash for file  (JavaScript)