Use bytes.concat in MessageHashUtils (#4504)
This commit is contained in:
@ -46,7 +46,8 @@ library MessageHashUtils {
|
||||
* See {ECDSA-recover}.
|
||||
*/
|
||||
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32 digest) {
|
||||
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(message.length), message));
|
||||
return
|
||||
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user