I simply want to create a 32 byte hash of a string and compare equality to another one, but this is proving almost impossible for some reason. E.g:
hash("a") == hash("b")
My compiler throws errors if I try to use
TypeError: Invalid type for argument in function call. Invalid implicit conversion from string memory to bytes memory requested. This function requires a single bytes argument as this only seems to be able to take
bytes memory. Hashes created by
abi.encode are not comparable with
== and are also not of a fixed length it seems so this also doesn't seem to be a solution.
I am new to programming in Solidity, so any help would be great; I am using solidity 0.5.0!