2016-01-18 09:20:20 +00:00
|
|
|
# base64
|
|
|
|
|
|
|
|
> Encode and decode using Base64 representation.
|
2021-08-23 20:33:24 +01:00
|
|
|
> More information: <https://www.unix.com/man-page/osx/1/base64/>.
|
2016-01-18 09:20:20 +00:00
|
|
|
|
|
|
|
- Encode a file:
|
|
|
|
|
2021-03-07 22:58:11 +00:00
|
|
|
`base64 --input={{plain_file}}`
|
2016-01-18 09:20:20 +00:00
|
|
|
|
|
|
|
- Decode a file:
|
|
|
|
|
2021-03-07 22:58:11 +00:00
|
|
|
`base64 --decode --input={{base64_file}}`
|
2016-01-18 09:20:20 +00:00
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Encode from `stdin`:
|
2016-01-18 09:20:20 +00:00
|
|
|
|
2022-02-14 11:21:43 +00:00
|
|
|
`echo -n "{{plain_text}}" | base64`
|
2016-01-18 09:20:20 +00:00
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Decode from `stdin`:
|
2016-01-18 09:20:20 +00:00
|
|
|
|
2021-03-07 22:58:11 +00:00
|
|
|
`echo -n {{base64_text}} | base64 --decode`
|