mirror of
https://github.com/minio/minio.git
synced 2025-11-29 13:28:17 -05:00
Replacing fastsha256 with crypto/sha256 package from golang standard package (#1584)
This commit is contained in:
committed by
Harshavardhana
parent
b044336329
commit
26e2c4bf4d
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user