BASEZ(1) | User Commands | BASEZ(1) |
basez - base 16/32/64 encode/decode data to standard output
basez [OPTION]... [FILE]
hex [OPTION]... [FILE]
unhex [OPTION]... [FILE]
base16 [OPTION]... [FILE]
base32 [OPTION]... [FILE]
base32plain [OPTION]... [FILE]
base32hex [OPTION]... [FILE]
base64 [OPTION]... [FILE]
base64plain [OPTION]... [FILE]
base64url [OPTION]... [FILE]
base64mime [OPTION]... [FILE]
base64pem [OPTION]... [FILE]
BaseZ encodes/decodes base16, base32, base32hex, base64 or base64url data stream per RFC 4648; MIME base64 Content-Transfer-Encoding per RFC 2045; or PEM Printable Encoding per RFC 1421.
Base16 encoding produces a multiple of two-character blocks in hexadecimal notation [0-9a-f]. It needs no padding and preserves the sort order of the encoded data. Decoding is case insensitive.
Base32 encoded stream is a multiple of eight-character blocks consisting of letters and numbers [A-Z2-7]. Numbers easily confused with some letters are skipped intentionally to make this encoding suitable for storage on -- or transport over -- any medium or data transport mechanism, including non-case-preserving barcodes or printed out strings that could be spelled out and typed in by humans. If needed, the last encoded block is padded with equal sign end padding. Appearance of the padding character [=] at the end of the encoded steam can be avoided by encoding data of size divisible by 5. Base32 decoding is case insensitive.
Base32hex encoding works the same way as base32 but witn an alternative character-set [0-9a-v] to preserve the encoded data sort order. This encoding should not be confused with base32.
Base64 encoded stream is a multiple of four-character blocks using uppercase letters, lowercase letters, numbers, plus and slash [A-Za-z0-9+/]. It uses equal sign [=] for end padding. Base64 decoding is case sensitive. It has an option to convert local native text line breaks into canonical CRLF sequences prior to encoding or to convert CRLF sequences into native text line breaks after the decoding.
Base64url encoding is technically the same as base64 but instead of the plus and slash signs [+/] it uses minus and underscore [-_]. Appearance of the padding character [=] in the encoded stream can be avoided by encoding data of size divisible by 3.
Base64mime and base64pem are the same encodes as base64 but with encoded stream line length limit of 76 and 64 characters respectively. PEM decoding ignores all white and non-printable characters; MIME decoding ignores all characters outside of the encode character-set.
When no FILE is specified or when FILE is -, read standard input. When multiple conflicting options appear, the last option wins.
Base16 decode a string:
Inspect output of a command:
Base32 encode a string:
MIME base64 encode a binary file to stdout per RFC 2045:
MIME base64 encode a text file to stdout per RFC 2045:
Base64 encode a file per RFC 4648
Written by Milan Kupcevic.
Report bugs to <bug-basez@quarkline.net> with a 'bug:' somewhere in the subject line.
These commands are parts of the BaseZ software package.
Copyright © 2013, 2015, 2016 Milan Kupcevic. This program comes with ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is licensed under the terms of the GNU GPL version 3 or any later version as published by the Free Software Foundation. User documentation is alternatively licensed under the Creative Commons Attribution-ShareAlike license version 3 or a later version as published by the Creative Commons Corporation.
October 2019 | BaseZ 1.6.2 |