fe25517f |
1 | \cfg{man-identity}{base64}{1}{2004-11-20}{Simon Tatham}{Simon Tatham} |
9acadc2b |
2 | \cfg{man-mindepth}{1} |
3 | |
4 | \C{base64-manpage} Man page for \cw{base64} |
5 | |
6 | \H{base64-manpage-name} NAME |
7 | |
8 | \cw{base64} - stand-alone encoder and decoder for base64 |
9 | |
10 | \H{base64-manpage-synopsis} SYNOPSIS |
11 | |
12 | \c base64 [ -d ] [ filename ] |
13 | \e bbbbbb bb iiiiiiii |
14 | \c base64 -e [ -cwidth ] [ filename ] |
15 | \e bbbbbb bb bbiiiii iiiiiiii |
16 | |
17 | \H{base64-manpage-description} DESCRIPTION |
18 | |
19 | \cw{base64} is a command-line utility for encoding and decoding the |
20 | \q{base64} encoding. |
21 | |
22 | This encoding, defined in RFC 2045, is primarily used to encode |
23 | binary attachments in MIME e-mail, but is widely used in many other |
24 | applications as well. For example, the \q{Content-MD5} mail header |
25 | contains a small piece of base64; SSH private keys are generally |
26 | stored as base64-encoded blobs; and so on. |
27 | |
28 | Other utilities, such as \cw{munpack}, exist which will take an |
29 | entire MIME-encoded message, identify the base64-encoded subparts, |
30 | and decode them. However, these utilities will not help you if you |
31 | need to inspect a Content-MD5 header or an SSH private key. |
32 | |
33 | \cw{base64} is a very simple stand-alone encoder and decoder for the |
34 | base64 format \e{alone}. It does not try to understand MIME headers |
35 | or anything other than raw data. |
36 | |
37 | \H{base64-manpage-options} OPTIONS |
38 | |
39 | By default (if neither \cw{-d} or \cw{-e} is supplied), \cw{base64} |
40 | operates in decode mode. |
41 | |
42 | \dt \cw{-d} |
43 | |
44 | \dd Places \cw{base64} into decode mode. In this mode, it will read |
45 | from standard input or the supplied file name, ignore all characters |
46 | that are not part of the base64 alphabet, decode the ones that are, |
47 | and output the decoded data on standard output. |
48 | |
49 | \dt \cw{-e} |
50 | |
51 | \dd Places \cw{base64} into encode mode. In this mode, it will read |
52 | binary data from standard input or the supplied file name, encode it |
53 | as base64, and output the encoded data on standard output. |
54 | |
55 | \dt \cw{-c}\e{width} |
56 | |
57 | \dd If \cw{base64} is operating in encode mode, this controls the |
58 | number of base64 characters output per line of the encoded file. |
59 | Normally base64-reading applications do not care about this, so the |
60 | default of 64 characters per line is perfectly adequate. |
61 | |
62 | \lcont{ |
63 | |
64 | The special value 0 will prevent \cw{base64} from ever writing a |
65 | line break in the middle of the data at all. |
66 | |
67 | The base64 encoding converts between a group of three plaintext |
68 | bytes and a group of four encoded bytes. \cw{base64} does not |
da0f8522 |
69 | support breaking an encoded group across a line (although it can |
70 | handle it as input if it receives it). Therefore, the \e{width} |
71 | parameter passed to \cw{-c} must be a multiple of 4. |
9acadc2b |
72 | |
73 | } |
da0f8522 |
74 | |
75 | \H{base64-manpage-licence} LICENCE |
76 | |
77 | \cw{base64} is free software, distributed under the MIT licence. |
78 | Type \cw{base64 --licence} to see the full licence text. |