mirror of
https://github.com/minio/minio.git
synced 2025-11-28 13:09:09 -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
@@ -19,13 +19,12 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
fastSha256 "github.com/minio/minio/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
// Verify if request has JWT.
|
||||
@@ -97,7 +96,7 @@ func getRequestAuthType(r *http.Request) authType {
|
||||
|
||||
// sum256 calculate sha256 sum for an input byte array
|
||||
func sum256(data []byte) []byte {
|
||||
hash := fastSha256.New()
|
||||
hash := sha256.New()
|
||||
hash.Write(data)
|
||||
return hash.Sum(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user