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

Method EncodeToString

checksum.go:280–287  ·  view source on GitHub ↗

EncodeToString the encoded hash value of the content provided in b.

(b []byte)

Source from the content-addressed store, hash-verified

278
279// EncodeToString the encoded hash value of the content provided in b.
280func (c ChecksumType) EncodeToString(b []byte) string {
281 if !c.IsSet() {
282 return ""
283 }
284 h := c.Hasher()
285 h.Write(b)
286 return base64.StdEncoding.EncodeToString(h.Sum(nil))
287}
288
289// String returns the type as a string.
290// Empty string for unset and "<invalid>" if not valid.

Callers 15

executeMethodMethod · 0.80
Test_SSEHeadersFunction · 0.80
TestFullObjectChecksum64Function · 0.80
sum256HexFunction · 0.80
sumMD5Base64Function · 0.80
putObjectMethod · 0.80
base64Method · 0.80
EncodedMethod · 0.80

Calls 2

IsSetMethod · 0.95
HasherMethod · 0.95

Tested by 4

Test_SSEHeadersFunction · 0.64
TestFullObjectChecksum64Function · 0.64
sum256hexFunction · 0.64