MCPcopy
hub / github.com/minio/minio-go / getHashedPayload

Function getHashedPayload

pkg/signer/request-signature-v4.go:101–108  ·  view source on GitHub ↗

getHashedPayload get the hexadecimal value of the SHA256 hash of the request payload.

(req http.Request)

Source from the content-addressed store, hash-verified

99// getHashedPayload get the hexadecimal value of the SHA256 hash of
100// the request payload.
101func getHashedPayload(req http.Request) string {
102 hashedPayload := req.Header.Get("X-Amz-Content-Sha256")
103 if hashedPayload == "" {
104 // Presign does not have a payload, use S3 recommended value.
105 hashedPayload = unsignedPayload
106 }
107 return hashedPayload
108}
109
110// getCanonicalHeaders generate a list of request headers for
111// signature.

Callers 4

PreSignV4Function · 0.85
PreSignV4OutpostsFunction · 0.85
signV4Function · 0.85
setSeedSignatureMethod · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected