Browse Source

go.crypto/openpgp/packet: use minimal interface for SerializeSignaturePrefix.

Only an io.Writer is needed in this case.

Fixes golang/go#6035.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13277044
Adam Langley 12 năm trước cách đây
mục cha
commit
488d045bc0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      openpgp/packet/public_key.go

+ 1 - 1
openpgp/packet/public_key.go

@@ -340,7 +340,7 @@ func (pk *PublicKey) parseElGamal(r io.Reader) (err error) {
 // SerializeSignaturePrefix writes the prefix for this public key to the given Writer.
 // The prefix is used when calculating a signature over this public key. See
 // RFC 4880, section 5.2.4.
-func (pk *PublicKey) SerializeSignaturePrefix(h hash.Hash) {
+func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) {
 	var pLength uint16
 	switch pk.PubKeyAlgo {
 	case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: