There are many situations where we need to get a Base64 Encoded string or a decode an already encoded string.
We can use the Linux command line to achieve this easily.
To Encode the string "admin:admin" we can use the following command.
We can use the Linux command line to achieve this easily.
Encode a String:
echo -n 'admin:admin' | base64This would give a result similar to the following.
YWRtaW46YWRtaW4=
Decode a String:
To Decode the string "YWRtaW46YWRtaW4=" we can use the following command.
echo "YWRtaW46YWRtaW4=" | base64 --decodeThis would give a result similar to the following
admin:admin
No comments:
Post a Comment