summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/md5/example_test.go
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
committerMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
commit8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch)
tree4449f2036cccf162e8417cc5841a35815b3e7ac5 /src/pkg/crypto/md5/example_test.go
parentc8bf49ef8a92e2337b69c14b9b88396efe498600 (diff)
downloadgolang-8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1.tar.gz
Imported Upstream version 1.3upstream/1.3
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
+}