summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/openpgp/canonical_text_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/openpgp/canonical_text_test.go')
-rw-r--r--libgo/go/crypto/openpgp/canonical_text_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/crypto/openpgp/canonical_text_test.go b/libgo/go/crypto/openpgp/canonical_text_test.go
index ae54f8c83ee..841475f80c0 100644
--- a/libgo/go/crypto/openpgp/canonical_text_test.go
+++ b/libgo/go/crypto/openpgp/canonical_text_test.go
@@ -17,8 +17,8 @@ func (r recordingHash) Write(b []byte) (n int, err error) {
return r.buf.Write(b)
}
-func (r recordingHash) Sum() []byte {
- return r.buf.Bytes()
+func (r recordingHash) Sum(in []byte) []byte {
+ return append(in, r.buf.Bytes()...)
}
func (r recordingHash) Reset() {
@@ -33,7 +33,7 @@ func testCanonicalText(t *testing.T, input, expected string) {
r := recordingHash{bytes.NewBuffer(nil)}
c := NewCanonicalTextHash(r)
c.Write([]byte(input))
- result := c.Sum()
+ result := c.Sum(nil)
if expected != string(result) {
t.Errorf("input: %x got: %x want: %x", input, result, expected)
}