crypto: use latest crypto-browserify
This commit is contained in:
parent
9d2784a441
commit
f0370ef46f
2 changed files with 6 additions and 5 deletions
|
@ -36,7 +36,7 @@
|
|||
"url": "https://github.com/bitcoinjs/bitcoinjs-lib.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "~4.1.5",
|
||||
"browserify": "4.1.11",
|
||||
"coveralls": "~2.10.0",
|
||||
"helloblock-js": "^0.2.1",
|
||||
"istanbul": "0.1.30",
|
||||
|
@ -68,9 +68,13 @@
|
|||
"test": "npm run-script unit",
|
||||
"unit": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`"
|
||||
},
|
||||
"browser": {
|
||||
"crypto": "crypto-browserify"
|
||||
},
|
||||
"dependencies": {
|
||||
"bigi": "1.1.0",
|
||||
"crypto-js": "3.1.2-3",
|
||||
"crypto-browserify": "2.1.8",
|
||||
"ecurve": "0.10.0",
|
||||
"secure-random": "0.2.1"
|
||||
}
|
||||
|
|
|
@ -13,10 +13,7 @@ function hash256(buffer) {
|
|||
}
|
||||
|
||||
function ripemd160(buffer) {
|
||||
var array = convert.bufferToWordArray(buffer)
|
||||
var result = CryptoJS.RIPEMD160(array)
|
||||
|
||||
return convert.wordArrayToBuffer(result)
|
||||
return crypto.createHash('rmd160').update(buffer).digest()
|
||||
}
|
||||
|
||||
function sha1(buffer) {
|
||||
|
|
Loading…
Reference in a new issue