How to use the eth-crypto.hash.keccak256 function in eth-crypto

To help you get started, we’ve selected a few eth-crypto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decentraland / explorer / kernel / packages / shared / crypto / Authenticator.ts View on Github external
static createEthereumMessageHash(msg: string) {
    let msgWithPrefix: string = `\x19Ethereum Signed Message:\n${msg.length}${msg}`
    const msgHash = hash.keccak256(msgWithPrefix)
    return msgHash
  }