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

Delta Between Two Patch Sets: src/pkg/crypto/openpgp/packet/packet.go

Issue 5358041: code review 5358041: renaming_2: gofix -r go1pkgrename src/pkg/[a-l]* (Closed)
Left Patch Set: diff -r ae8e8c32ff4a https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Right Patch Set: diff -r f759d7ef4e8b https://go.googlecode.com/hg/ Created 13 years, 4 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 | « src/pkg/crypto/openpgp/packet/encrypted_key_test.go ('k') | src/pkg/crypto/openpgp/packet/private_key.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 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 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 packet implements parsing and serialization of OpenPGP packets, as 5 // Package packet implements parsing and serialization of OpenPGP packets, as
6 // specified in RFC 4880. 6 // specified in RFC 4880.
7 package packet 7 package packet
8 8
9 import ( 9 import (
10 "crypto/aes" 10 "crypto/aes"
11 "crypto/cast5" 11 "crypto/cast5"
12 "crypto/cipher" 12 "crypto/cipher"
13
14 error_ "crypto/openpgp/error" 13 error_ "crypto/openpgp/error"
15 "io" 14 "io"
16 "math/big" 15 "math/big"
17 ) 16 )
18 17
19 // readFull is the same as io.ReadFull except that reading zero bytes returns 18 // readFull is the same as io.ReadFull except that reading zero bytes returns
20 // ErrUnexpectedEOF rather than EOF. 19 // ErrUnexpectedEOF rather than EOF.
21 func readFull(r io.Reader, buf []byte) (n int, err error) { 20 func readFull(r io.Reader, buf []byte) (n int, err error) {
22 n, err = io.ReadFull(r, buf) 21 n, err = io.ReadFull(r, buf)
23 if err == io.EOF { 22 if err == io.EOF {
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 if err == nil { 473 if err == nil {
475 _, err = w.Write(mpiBytes) 474 _, err = w.Write(mpiBytes)
476 } 475 }
477 return 476 return
478 } 477 }
479 478
480 // writeBig serializes a *big.Int to w. 479 // writeBig serializes a *big.Int to w.
481 func writeBig(w io.Writer, i *big.Int) error { 480 func writeBig(w io.Writer, i *big.Int) error {
482 return writeMPI(w, uint16(i.BitLen()), i.Bytes()) 481 return writeMPI(w, uint16(i.BitLen()), i.Bytes())
483 } 482 }
LEFTRIGHT

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