Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static createEthereumMessageHash(msg: string) {
let msgWithPrefix: string = `\x19Ethereum Signed Message:\n${msg.length}${msg}`
const msgHash = hash.keccak256(msgWithPrefix)
return msgHash
}