Compare commits

..

1 Commits

Author SHA1 Message Date
fiatjaf
740b0516d9 replace crypto with create-hash. 2019-12-20 20:58:55 -03:00
2 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,7 @@
"bitcoinjs-lib": "^3.3.1",
"bn.js": "^4.11.8",
"coininfo": "^4.5.0",
"create-hash": "^1.2.0",
"lodash": "^4.17.11",
"safe-buffer": "^5.1.1",
"secp256k1": "^3.4.0"

View File

@ -1,6 +1,6 @@
'use strict'
const crypto = require('crypto')
const createHash = require('create-hash')
const bech32 = require('bech32')
const secp256k1 = require('secp256k1')
const Buffer = require('safe-buffer').Buffer
@ -128,7 +128,7 @@ function intBEToWords (intBE, bits) {
}
function sha256 (data) {
return crypto.createHash('sha256').update(data).digest()
return createHash('sha256').update(data).digest()
}
function convert (data, inBits, outBits) {