Sign binary data not hash on eth_sign

feature/default_network_editable
Dan Finlay 9 years ago
parent a4b87b3625
commit 37e552e95d
  1. 4
      app/scripts/lib/idStore.js

@ -492,8 +492,8 @@ function IdManagement(opts) {
// sign message // sign message
var privKeyHex = this.exportPrivateKey(address) var privKeyHex = this.exportPrivateKey(address)
var privKey = ethUtil.toBuffer(privKeyHex) var privKey = ethUtil.toBuffer(privKeyHex)
var msgHash = ethUtil.sha3(message) var msgBuffer = new Buffer(message.replace('0x',''), 'hex')
var msgSig = ethUtil.ecsign(msgHash, privKey) var msgSig = ethUtil.ecsign(msgBuffer, privKey)
var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s)) var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s))
return rawMsgSig return rawMsgSig
} }

Loading…
Cancel
Save