[URGENT] How can I use "compare" function on Solidity!

I face a problem with the Compare function on Solidity, can anyone help me :smiley: . I am a newbie :hugs:

1 Like

Hey, this post does not suggest a change on the protocol or a campaign to add value to neither Hectagon or its portfolio.
I will move it to the #uncategorized instead.

1 Like

You can compare strings like this:

function compareStrings(string memory a, string memory b) public view returns (bool) {
    return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
}

As a side note: It’s not secure at all dealing with passwords and usernames in Solidity.

1 Like

Thanks a lot , I had completely done my contract to mint/burn :100:

1 Like