UUID generation, base64 encode/decode
linux
uuidgen
base64
How to generate UUID in the linux
uuidgen
will get something like
40CB8E14-B8E7-4C7F-849E-76E1ACC23101
How to encode your secret with base64
echo -n "my super secret" | base64
the result will be
bXkgc3VwZXIgc2VjcmV0
How to decode your secret (previously encoded with base64
)
echo bXkgc3VwZXIgc2VjcmV0 | base64 -d
the result will be
my super secret%
the %
char in the end means there is no CR/LF in the end
Note:
If you forget -n
during encode:
the result will be
bXkgc3VwZXIgc2VjcmV0Cg==
That’s a different thing.
We encoded line my super secret
with \n
in the end.
During the decode output will be:
my super secret
without %
char in the end.
That means, that output contains \n
in the end.
There is a useful pipe on the macOS to put output to the clipboard
echo -n "my super secret" | base64 | pbcopy
the result bXkgc3VwZXIgc2VjcmV0
will be in clipboard
intel
cas
links
atomic
ruby
jekyll
blog
scala
markdown
mdoc
java
encapsulation
git
tag
http4s
saml
pac4j
linux
uuidgen
base64
lsof
jps
github
sed
cicd
teaching
laika
enumeratum
database
fp
SQL
interview