Use crypto.randomBytes() instead of crypto.createHash().