1

I am trying to sign a message using the following code:ethJsUtil.ecsign(ethJsUtil.sha256(msg),new Buffer('0x...'))

Where 0x... is my private key taken from MyEtherWallet. It gives the error in the title both with and without the 0x at the beginning

0

ethJsUtil.ecsign(ethJsUtil.sha256(msg),ethJsUtil.toBuffer('0x...')) works. new Buffer was returning an empty buffer

| improve this answer | |
0

Basically you pasted:

node ./keygen.js 0xdd0c9ec256a7e76a6693a0d2dea01a6de6b7dfeaf3afcaef7b95647758c79c1a  

Instead of:

node ./keygen.js dd0c9ec256a7e76a6693a0d2dea01a6de6b7dfeaf3afcaef7b95647758c79c1a  
| improve this answer | |
  • Please explain the relevance of this answer. It's been flagged by two different users and I reluctantly will clean this up if it gets another flag. – eth Jul 14 '17 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.