The function keccak256 ()
takes a bytes variable. You can't pass it bytes3 or byte []; it has to be of type bytes.
How do you set that to a specific value?
Here are some things I've tried, and the error messages I got.
bytes memory a = 0x05;
Error: Type int_const 5 is not implicitly convertible to expected type bytes memory.
bytes memory b = bytes (0x05);
Error: Explicit type conversion not allowed from "int_const 5" to "bytes memory".
bytes1 c = 0x05;
bytes memory d = c;
Error: Type bytes1 is not implicitly convertible to expected type bytes memory.
bytes memory e = bytes (c);
Error: Explicit type conversion not allowed from "bytes1" to "bytes memory".
Is it even possible to create a variable of type bytes and set it to specific hex bytes?