LEFT | RIGHT |
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 | 5 package packet |
6 | 6 |
7 import ( | 7 import ( |
| 8 "code.google.com/p/go.crypto/openpgp/errors" |
| 9 "code.google.com/p/go.crypto/openpgp/s2k" |
8 "crypto" | 10 "crypto" |
9 "crypto/dsa" | 11 "crypto/dsa" |
10 "crypto/openpgp/errors" | |
11 "crypto/openpgp/s2k" | |
12 "crypto/rsa" | 12 "crypto/rsa" |
13 "encoding/binary" | 13 "encoding/binary" |
14 "hash" | 14 "hash" |
15 "io" | 15 "io" |
16 "strconv" | 16 "strconv" |
17 "time" | 17 "time" |
18 ) | 18 ) |
19 | 19 |
20 // Signature represents a signature. See RFC 4880, section 5.2. | 20 // Signature represents a signature. See RFC 4880, section 5.2. |
21 type Signature struct { | 21 type Signature struct { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 if len(sig.PreferredHash) > 0 { | 602 if len(sig.PreferredHash) > 0 { |
603 subpackets = append(subpackets, outputSubpacket{true, prefHashAl
gosSubpacket, false, sig.PreferredHash}) | 603 subpackets = append(subpackets, outputSubpacket{true, prefHashAl
gosSubpacket, false, sig.PreferredHash}) |
604 } | 604 } |
605 | 605 |
606 if len(sig.PreferredCompression) > 0 { | 606 if len(sig.PreferredCompression) > 0 { |
607 subpackets = append(subpackets, outputSubpacket{true, prefCompre
ssionSubpacket, false, sig.PreferredCompression}) | 607 subpackets = append(subpackets, outputSubpacket{true, prefCompre
ssionSubpacket, false, sig.PreferredCompression}) |
608 } | 608 } |
609 | 609 |
610 return | 610 return |
611 } | 611 } |
LEFT | RIGHT |