Demo3 - Password

Aim of demo:

Here we introduce the concept of not saving settings in their original form. This demo uses passwords as an example.

What it does:

As it is pointless to save passwords in settings files, Demo3 shows how an encrypted password mechanism can be implemented instead.

How it's done:

The idea is that you never hold a password in its original form. As soon as you get a password, it must be encrypted. It is the encrypted version of the password that is saved to storage.

The methods SetPassword() and IsValidPassword() provide needed functionality.