|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|