Shihui Guo

Using base64 to decode/encode a string using Linux Command Line

Personally I think it's a good way to prevent some email spammer to get your email address.

So to encode your email,

$ echo "youremail@domain.com" | base64

It will return the encoded string:

eW91cmVtYWlsQGRvbWFpbi5jb20K

To decode, do:

echo "eW91cmVtYWlsQGRvbWFpbi5jb20K" | base64 -d

It will return exactly your information.

Hope it helps!

点击查看评论