diff --git a/README.md b/README.md index 4766ac6d..878879a3 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,7 @@ Here are the Go packages that can be imported correctly: * [hash/adler32](https://pkg.go.dev/hash/adler32) * [hash/crc32](https://pkg.go.dev/hash/crc32) (partially) * [hash/crc64](https://pkg.go.dev/hash/crc64) +* [crypto](https://pkg.go.dev/crypto) * [crypto/md5](https://pkg.go.dev/crypto/md5) * [crypto/sha1](https://pkg.go.dev/crypto/sha1) * [crypto/sha256](https://pkg.go.dev/crypto/sha256) diff --git a/_cmptest/md5demo/md5.go b/_cmptest/md5demo/md5.go index dbee9e66..ebe57948 100644 --- a/_cmptest/md5demo/md5.go +++ b/_cmptest/md5demo/md5.go @@ -1,6 +1,7 @@ package main import ( + "crypto" "crypto/md5" "fmt" "io" @@ -10,5 +11,10 @@ func main() { h := md5.New() io.WriteString(h, "The fog is getting thicker!") io.WriteString(h, "And Leon's getting laaarger!") - fmt.Printf("%x", h.Sum(nil)) + fmt.Printf("%x\n", h.Sum(nil)) + + h = crypto.MD5.New() + io.WriteString(h, "The fog is getting thicker!") + io.WriteString(h, "And Leon's getting laaarger!") + fmt.Printf("%x\n", h.Sum(nil)) }