added md5
This commit is contained in:
parent
54ae8e472e
commit
e59d499036
3
main.go
3
main.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"crypto/sha512"
|
"crypto/sha512"
|
||||||
@ -23,6 +24,8 @@ func main() {
|
|||||||
h = sha256.New()
|
h = sha256.New()
|
||||||
case "sha512", "512":
|
case "sha512", "512":
|
||||||
h = sha512.New()
|
h = sha512.New()
|
||||||
|
case "md5":
|
||||||
|
h = md5.New()
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(os.Stderr, "unsupported algorithm: %v\n", *algo)
|
fmt.Fprintf(os.Stderr, "unsupported algorithm: %v\n", *algo)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user