crypto: use latest crypto-browserify

This commit is contained in:
Daniel Cousens 2014-06-26 19:26:54 +10:00
parent 9d2784a441
commit f0370ef46f
2 changed files with 6 additions and 5 deletions

View file

@ -36,7 +36,7 @@
"url": "https://github.com/bitcoinjs/bitcoinjs-lib.git" "url": "https://github.com/bitcoinjs/bitcoinjs-lib.git"
}, },
"devDependencies": { "devDependencies": {
"browserify": "~4.1.5", "browserify": "4.1.11",
"coveralls": "~2.10.0", "coveralls": "~2.10.0",
"helloblock-js": "^0.2.1", "helloblock-js": "^0.2.1",
"istanbul": "0.1.30", "istanbul": "0.1.30",
@ -68,9 +68,13 @@
"test": "npm run-script unit", "test": "npm run-script unit",
"unit": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`" "unit": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`"
}, },
"browser": {
"crypto": "crypto-browserify"
},
"dependencies": { "dependencies": {
"bigi": "1.1.0", "bigi": "1.1.0",
"crypto-js": "3.1.2-3", "crypto-js": "3.1.2-3",
"crypto-browserify": "2.1.8",
"ecurve": "0.10.0", "ecurve": "0.10.0",
"secure-random": "0.2.1" "secure-random": "0.2.1"
} }

View file

@ -13,10 +13,7 @@ function hash256(buffer) {
} }
function ripemd160(buffer) { function ripemd160(buffer) {
var array = convert.bufferToWordArray(buffer) return crypto.createHash('rmd160').update(buffer).digest()
var result = CryptoJS.RIPEMD160(array)
return convert.wordArrayToBuffer(result)
} }
function sha1(buffer) { function sha1(buffer) {