crypto-utils.js 207 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
'use strict'

const crypto = require('crypto')

const CryptoUtils = {
  sha1 (data) {
    return crypto
      .createHash('sha1')
      .update(data)
      .digest('hex')
  }
}

module.exports = CryptoUtils