Update server.js

Renamed the random_sha1() to be closer to javascript conventions.