As you know, you shouldn’t store passwords and other sensitive data in plain text. A good approach is to store the data’s MD5 hash.

For example, instead of storing the password 1234 in plain text, you would store 81dc9bdb52d04dc20036dbd8313ed055. In order to authenticate, you generate the MD5 hash from the user input and then you compare both hashes.

To increase security, you should add a salt before generating the MD5 hash. A salt is a small string containing random characters that are not known by the user.