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

Function sum256Hex

utils.go:93–98  ·  view source on GitHub ↗

sum256 calculate sha256sum for an input byte array, returns hex encoded.

(data []byte)

Source from the content-addressed store, hash-verified

91
92// sum256 calculate sha256sum for an input byte array, returns hex encoded.
93func sum256Hex(data []byte) string {
94 hash := newSHA256Hasher()
95 defer hash.Close()
96 hash.Write(data)
97 return hex.EncodeToString(hash.Sum(nil))
98}
99
100// sumMD5Base64 calculate md5sum for an input byte array, returns base64 encoded.
101func sumMD5Base64(data []byte) string {

Callers 14

SelectObjectContentMethod · 0.85
FGetObjectMethod · 0.85
PutObjectLegalHoldMethod · 0.85
doMakeBucketMethod · 0.85
removeObjectsIterMethod · 0.85
removeObjectsMethod · 0.85
SetBucketNotificationMethod · 0.85
PromptObjectMethod · 0.85
RestoreObjectMethod · 0.85

Calls 3

EncodeToStringMethod · 0.80
newSHA256HasherFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected