crypto-utils.js 207 B

1234567891011121314
  1. 'use strict'
  2. const crypto = require('crypto')
  3. const CryptoUtils = {
  4. sha1 (data) {
  5. return crypto
  6. .createHash('sha1')
  7. .update(data)
  8. .digest('hex')
  9. }
  10. }
  11. module.exports = CryptoUtils