From e59d4990361b0221c32dfdff0bc62d0f80f75611 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 3 Jan 2016 20:15:32 -0800 Subject: [PATCH] added md5 --- main.go | 3 +++ readme.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 929b3ef..5a5b019 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "crypto/md5" "crypto/sha1" "crypto/sha256" "crypto/sha512" @@ -23,6 +24,8 @@ func main() { h = sha256.New() case "sha512", "512": h = sha512.New() + case "md5": + h = md5.New() default: fmt.Fprintf(os.Stderr, "unsupported algorithm: %v\n", *algo) os.Exit(1) diff --git a/readme.md b/readme.md index 0f02e1b..e0795aa 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ calculate checksums -It's a simpler version of shasum + md5sum, but only for sha1, sha256, and +It's a simpler version of shasum + md5sum, but only for md5, sha1, sha256, and sha512. ## usage