mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00

later with @bmatusiak check sea.then for '../gun.js' vs '../' vs ... note: src/index -> core.js TODO: something about WebRTC candidates hitting ack decrement limits?
10 lines
325 B
JavaScript
10 lines
325 B
JavaScript
;(function(){
|
|
|
|
// 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
|
|
|
|
}()); |