Create SHA1 hash 'use strict'; const crypto = require('crypto'); let hash = crypto.createHash('sha1').update('some data to hash').digest('hex'); console.log('hash:', hash); Output: hash: 3d22ca807ad75c9ff3ca07c4e6c396b7d99f7206