sha1.js 305 B

12345678
  1. // This internal func returns SHA-1 hashed data for KeyID generation
  2. const __shim = require('./shim')
  3. const subtle = __shim.subtle
  4. const ossl = __shim.ossl ? __shim.ossl : subtle
  5. const sha1hash = (b) => ossl.digest({name: 'SHA-1'}, new ArrayBuffer(b))
  6. module.exports = sha1hash