Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(515)

Delta Between Two Patch Sets: openpgp/armor/armor.go

Issue 5564059: code review 5564059: go.crypto: initial code (Closed)
Left Patch Set: diff -r b50a7fb49394 https://code.google.com/p/go.crypto Created 12 years, 2 months ago
Right Patch Set: diff -r b50a7fb49394 https://code.google.com/p/go.crypto Created 12 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « ocsp/ocsp_test.go ('k') | openpgp/armor/armor_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b