I have so many secrets and nowhere to keep them!
The goal is simple: write a program that lets you save a string and have it be protected by a password.
The program will take an alias, password and (optional) secret as parameters.
If this is the first time the program is called with a given alias, then it will store/remember the secret, and output whatever you want.
If the program is called with an alias that has been used before, then it will output the secret for that alias iff the password is the same as the first time the program was run with that alias.
Other cases
If its the first time being called with a certain alias and no secret is given - store nothing.
If the program is called with an alias that has been used, and the password is incorrect - return any kind of error or nothing at all.
If the program is called with an alias that has been used, the password is correct and a new secret is supplied - output the old secret and replace it with the new one so that next time only the new secret is output.
If the program is called with an alias that has been used, the password is correct and no new secret is supplied - output the old secret and make sure it doesn't get replaced.
Note: These secrets/passwords do not need to be stored securely
Also note: any alphanumeric input for aliases passwords and secrets should be accepted
Standard rules apply, good luck!