In this recipe, you will learn how to mask passwords as configuration files so that they are not visible, or better, are meaningless for people looking at them.
You may have heard about transforming a text that should be secret or private, such as a password. Often times, terms such as encoding, encryption, and hashing are used indiscriminately, but they are not the same. Let's clear these concepts before we go.
Encoding a text is about transforming it to make it readable and acceptable for a different format (like the
& symbol in HTML should be converted to
Encryption is about transforming a text to make it secret and meaningless. The transformation is based on a key and an algorithm (like AES, ...