LEFT | RIGHT |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is | 5 // Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is |
6 // very similar to PEM except that it has an additional CRC checksum. | 6 // very similar to PEM except that it has an additional CRC checksum. |
7 package armor | 7 package armor |
8 | 8 |
9 import ( | 9 import ( |
10 "bufio" | 10 "bufio" |
11 "bytes" | 11 "bytes" |
12 » "crypto/openpgp/errors" | 12 » "code.google.com/p/go.crypto/openpgp/errors" |
13 "encoding/base64" | 13 "encoding/base64" |
14 "io" | 14 "io" |
15 ) | 15 ) |
16 | 16 |
17 // A Block represents an OpenPGP armored structure. | 17 // A Block represents an OpenPGP armored structure. |
18 // | 18 // |
19 // The encoded form is: | 19 // The encoded form is: |
20 // -----BEGIN Type----- | 20 // -----BEGIN Type----- |
21 // Headers | 21 // Headers |
22 // | 22 // |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 } | 210 } |
211 | 211 |
212 p.lReader.in = r | 212 p.lReader.in = r |
213 p.oReader.currentCRC = crc24Init | 213 p.oReader.currentCRC = crc24Init |
214 p.oReader.lReader = &p.lReader | 214 p.oReader.lReader = &p.lReader |
215 p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) | 215 p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) |
216 p.Body = &p.oReader | 216 p.Body = &p.oReader |
217 | 217 |
218 return | 218 return |
219 } | 219 } |
LEFT | RIGHT |