Hash160 now outputs a buffer

This commit is contained in:
Daniel Cousens 2014-04-08 23:44:55 +10:00
parent d12a2cde49
commit aa8d86e6a4
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ function hash160(buffer) {
var step2a = convert.bytesToWordArray(step1) var step2a = convert.bytesToWordArray(step1)
var step2b = CryptoJS.RIPEMD160(step2a) var step2b = CryptoJS.RIPEMD160(step2a)
return convert.wordArrayToBytes(step2b) return new Buffer(convert.wordArrayToBytes(step2b))
} }
function hash256(buffer) { function hash256(buffer) {

View file

@ -130,7 +130,7 @@ HDWallet.prototype.getIdentifier = function() {
} }
HDWallet.prototype.getFingerprint = function() { HDWallet.prototype.getFingerprint = function() {
return this.getIdentifier().slice(0, 4) return Array.prototype.slice.call(this.getIdentifier(), 0, 4)
} }
HDWallet.prototype.getAddress = function() { HDWallet.prototype.getAddress = function() {