Added the hash generation on generate button click and the same has generation on server side