UNPKG

@greenpress/cli

Version:
10 lines (7 loc) 272 B
const crypto = require('crypto'); function getRandomHash() { const currentDate = new Date().valueOf().toString() const random = Math.random().toString() return crypto.createHash('sha1').update(currentDate + random).digest('hex'); } module.exports = { getRandomHash }