Browse Source

Hash160 now outputs a buffer

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
aa8d86e6a4
  1. 2
      src/crypto.js
  2. 2
      src/hdwallet.js

2
src/crypto.js

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

2
src/hdwallet.js

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

Loading…
Cancel
Save