Blob


1 .TH PEM 1
2 .SH NAME
3 pemdecode, pemencode \- encode files in Privacy Enhanced Mail (PEM) format
4 .SH SYNOPSIS
5 .PP
6 .B auth/pemdecode
7 .I section
8 [
9 .I file
10 ]
11 .PP
12 .B auth/pemencode
13 .I section
14 [
15 .I file
16 ]
17 .SH DESCRIPTION
18 PEM is a textual encoding for binary data originally used by the
19 Privacy Enhanced Mail program but now commonly used for
20 other applications, notably TLS.
21 PEM encodes data in base 64
22 (see
23 .MR encode (3) )
24 between lines of the form:
25 .IP
26 .EX
27 -----BEGIN SECTION-----
28 -----END SECTION-----
29 .EE
30 .LP
31 where
32 .B SECTION
33 may be any string describing the encoded data.
34 The most common use of PEM format on Plan 9 is for encoding
35 X.509 certificates; see
36 .MR rsa (1) .
37 .PP
38 .I Pemdecode
39 extracts the named
40 .I section
41 and writes the decoded data to standard output.
42 .PP
43 .I Pemencode
44 encodes its standard input, labels it as a
45 .IR section ,
46 and writes it to standard output.
47 .SH EXAMPLES
48 Encode and decode a simple greeting:
49 .IP
50 .EX
51 % echo hello world |
52 auth/pemencode GREETING
53 -----BEGIN GREETING-----
54 aGVsbG8gd29ybGQK
55 -----END GREETING-----
56 % echo hello world |
57 auth/pemencode GREETING |
58 auth/pemdecode GREETING
59 hello world
60 %
61 .EE
62 .SH SOURCE
63 .B \*9/src/cmd/auth
64 .SH "SEE ALSO
65 .MR rsa (1)