How to encode and decode the strings with base64
Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The Base64 term originates from a specific MIME content transfer encoding.
Base64 encoding schemes are commonly used when there is a need to encode binary data that need to be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remain intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME, and storing complex data in XML.
In this post we will learn how we can use base64 in bash.
For this first of all install the openssl in linux system
- In CentOS or Redhat
yum install openssl
- In Debian or Ubuntu
sudo apt-get install openssl
For eg. I am using a string called [email protected]@radchh3tr1.coM
To Encode The String With base64 Use the given below command
To Decode The Same String With base64 Use the given below command