const crypto = require('crypto'); function createValidHash(originalId,userName) { const sha1sum = crypto.createHash('sha1'); sha1sum.update(originalId+userName); return sha1sum.digest('hex'); }