LoginSignup
0
0

More than 5 years have passed since last update.

base64 encode and decode in command line

Last updated at Posted at 2018-12-30
$ echo -n "credentials" | base64
Y3JlZGVudGlhbHM=

$ echo -n "Y3JlZGVudGlhbHM=" | base64 --decode
credentials

echo -n とせず echo としてしまうと、末尾の改行コードが変換結果に含まれてしまうため、意図した結果にならない。注意すること

$ echo "credentials" | base64
Y3JlZGVudGlhbHMK

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0