diff --git a/.gitignore b/.gitignore index c2d94e6..a848dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Binaries for programs and plugins +/packwiz *.exe *.exe~ *.dll @@ -12,4 +13,4 @@ *.out # I use GoLand now -.idea/ \ No newline at end of file +.idea/ diff --git a/core/hash.go b/core/hash.go index ef05119..62487a8 100644 --- a/core/hash.go +++ b/core/hash.go @@ -4,13 +4,14 @@ import ( "crypto/md5" "crypto/sha256" "crypto/sha512" + "strings" "errors" "hash" ) // GetHashImpl gets an implementation of hash.Hash for the given hash type string func GetHashImpl(hashType string) (hash.Hash, error) { - switch hashType { + switch strings.ToLower(hashType) { case "sha256": return sha256.New(), nil case "sha512":