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