Created
May 10, 2019 20:18
-
-
Save miguelmota/d9b11844806012254649d6e097878b9e to your computer and use it in GitHub Desktop.
Truffle web3.js add prefix to message hash for signing example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let hash = web3.utils.soliditySha3('abc') | |
let prefixedHash = web3.utils.soliditySha3('\x19Ethereum Signed Message:\n32', hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment