The storage variable string private s_password takes the storage slot 1 can be read and able to retrieve the password irrespective of it's visibility.
The string private s_password can be read using following code, (for testing, I deployed the code locally in remix)
When calling the readFromStorage function with i equals 1 it will return the password in bytes32 format, which can be converted in to text to retrieve the password.
Remix IDE
Encrypt the password with a private key which is known only to the owner when storing it to the storage.
Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.