UNPKG

gun

Version:

A realtime, decentralized, offline-first, graph data synchronization engine.

8 lines (6 loc) 305 B
// This internal func returns SHA-1 hashed data for KeyID generation const __shim = require('./shim') const subtle = __shim.subtle const ossl = __shim.ossl ? __shim.ossl : subtle const sha1hash = (b) => ossl.digest({name: 'SHA-1'}, new ArrayBuffer(b)) module.exports = sha1hash