First I thought I could easily use private
like:
mapping (address => bytes32) private userPassword;
and so just check if the entered password is right:
function enter(bytes32 password) {
if (password == userPassword[msg.sender])
//do smth
}
But then I read this in solidity docs:
Everything that is inside a contract is visible to all external observers. Making something private only prevents other contracts from accessing and modifying the information, but it will still be visible to the whole world outside of the blockchain.
So if I got it right, even if I use "private" visibility still everyone can see values of stored passwords. Then how should I store information that shouldn't be for public?