added script.js, example.json

new function to generate hash number