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/openpgp/errors" | |
10 "crypto/openpgp/s2k" | |
11 "encoding/binary" | 11 "encoding/binary" |
12 "io" | 12 "io" |
13 "strconv" | 13 "strconv" |
14 ) | 14 ) |
15 | 15 |
16 // OnePassSignature represents a one-pass signature packet. See RFC 4880, | 16 // OnePassSignature represents a one-pass signature packet. See RFC 4880, |
17 // section 5.4. | 17 // section 5.4. |
18 type OnePassSignature struct { | 18 type OnePassSignature struct { |
19 SigType SignatureType | 19 SigType SignatureType |
20 Hash crypto.Hash | 20 Hash crypto.Hash |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if ops.IsLast { | 64 if ops.IsLast { |
65 buf[12] = 1 | 65 buf[12] = 1 |
66 } | 66 } |
67 | 67 |
68 if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err
!= nil { | 68 if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err
!= nil { |
69 return err | 69 return err |
70 } | 70 } |
71 _, err := w.Write(buf[:]) | 71 _, err := w.Write(buf[:]) |
72 return err | 72 return err |
73 } | 73 } |
LEFT | RIGHT |