generate a js hash from user to file