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

Unified Diff: src/pkg/crypto/ripemd160/ripemd160_test.go

Issue 5448065: code review 5448065: Add a []byte argument to hash.Hash to allow an allocati... (Closed)
Patch Set: diff -r 5ef46981bf5e https://go.googlecode.com/hg/ Created 13 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/crypto/ripemd160/ripemd160.go ('k') | src/pkg/crypto/rsa/pkcs1v15_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/crypto/ripemd160/ripemd160_test.go
===================================================================
--- a/src/pkg/crypto/ripemd160/ripemd160_test.go
+++ b/src/pkg/crypto/ripemd160/ripemd160_test.go
@@ -38,10 +38,10 @@
io.WriteString(md, tv.in)
} else {
io.WriteString(md, tv.in[0:len(tv.in)/2])
- md.Sum()
+ md.Sum(nil)
io.WriteString(md, tv.in[len(tv.in)/2:])
}
- s := fmt.Sprintf("%x", md.Sum())
+ s := fmt.Sprintf("%x", md.Sum(nil))
if s != tv.out {
t.Fatalf("RIPEMD-160[%d](%s) = %s, expected %s", j, tv.in, s, tv.out)
}
@@ -56,7 +56,7 @@
io.WriteString(md, "aaaaaaaaaa")
}
out := "52783243c1697bdbe16d37f97f68f08325dc1528"
- s := fmt.Sprintf("%x", md.Sum())
+ s := fmt.Sprintf("%x", md.Sum(nil))
if s != out {
t.Fatalf("RIPEMD-160 (1 million 'a') = %s, expected %s", s, out)
}
« no previous file with comments | « src/pkg/crypto/ripemd160/ripemd160.go ('k') | src/pkg/crypto/rsa/pkcs1v15_test.go » ('j') | no next file with comments »

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