base64 − encode and decode base64 data
base64 [−dv] [−o FILE] [FILE]
When encoding (the default mode), a binary file is read and a base64 format file is created. If no input file argument is provided, or file is '−', stdin will be used. The base64 output contains 76 characters per line. Output is written to stdout by default.
When decoding, the input file is expected to contain only valid base64 characters (alphanumeric, '+', '/' and '='). Spaces are ignored when decoding. Selecting a binary file as input will result in an error.
The following options are available:
|
−d |
Decode data |
−o FILE
Write output to the specified FILE
|
−v |
Print version number and exit |
No option exists for wrapping encoded base64 output at different column widths.
It might be desirable to ignore unrecognised input characters when decoding. This version of base64 has no option for relaxing the input validation.
Written by Michael Mikonos.
Copyright (c) 2023 Michael Mikonos.
This code is licensed under the Artistic License 2.