summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/md5/example_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/crypto/md5/example_test.go')
-rw-r--r--src/pkg/crypto/md5/example_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/crypto/md5/example_test.go b/src/pkg/crypto/md5/example_test.go
index 28be770a7..d47bb4570 100644
--- a/src/pkg/crypto/md5/example_test.go
+++ b/src/pkg/crypto/md5/example_test.go
@@ -17,3 +17,9 @@ func ExampleNew() {
fmt.Printf("%x", h.Sum(nil))
// Output: e2c569be17396eca2a2e3c11578123ed
}
+
+func ExampleSum() {
+ data := []byte("These pretzels are making me thirsty.")
+ fmt.Printf("%x", md5.Sum(data))
+ // Output: b0804ec967f48520697662a204f5fe72
+}