Replacing fastsha256 with crypto/sha256 package from golang standard package (#1584)

This commit is contained in:
karthic rao
2016-05-11 02:50:11 +05:30
committed by Harshavardhana
parent b044336329
commit 26e2c4bf4d
6 changed files with 8 additions and 12 deletions

View File

@@ -18,13 +18,12 @@ package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"net/http"
"regexp"
"strings"
"unicode/utf8"
fastSha256 "github.com/minio/minio/pkg/crypto/sha256"
)
// isValidRegion - verify if incoming region value is valid with configured Region.
@@ -42,7 +41,7 @@ func isValidRegion(reqRegion string, confRegion string) bool {
// sumHMAC calculate hmac between two input byte array.
func sumHMAC(key []byte, data []byte) []byte {
hash := hmac.New(fastSha256.New, key)
hash := hmac.New(sha256.New, key)
hash.Write(data)
return hash.Sum(nil)
}