- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for getSHA256Hash (0.16 sec)
-
cmd/hasher.go
package cmd import ( "crypto/md5" "encoding/hex" "github.com/minio/minio/internal/hash/sha256" ) // getSHA256Hash returns SHA-256 hash in hex encoding of given data. func getSHA256Hash(data []byte) string { return hex.EncodeToString(getSHA256Sum(data)) } // getSHA256Hash returns SHA-256 sum of given data. func getSHA256Sum(data []byte) []byte { hash := sha256.New() hash.Write(data) return hash.Sum(nil)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 27 13:00:19 UTC 2022 - 1.4K bytes - Viewed (0) -
cmd/config-common.go
return err } func saveConfigWithOpts(ctx context.Context, store objectIO, configFile string, data []byte, opts ObjectOptions) error { hashReader, err := hash.NewReader(ctx, bytes.NewReader(data), int64(len(data)), "", getSHA256Hash(data), int64(len(data))) if err != nil { return err } _, err = store.PutObject(ctx, minioMetaBucket, configFile, NewPutObjReader(hashReader), opts) return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 3.1K bytes - Viewed (0) -
cmd/object-api-putobject_test.go
// With valid md5sum and sha256. 20: {bucketName: bucket, objName: object, inputData: data, inputMeta: md5Header(data), inputSHA256: getSHA256Hash(data), inputDataSize: int64(len(data)), expectedMd5: getMD5Hash(data)}, 21: {bucketName: bucket, objName: object, inputData: nilBytes, inputMeta: md5Header(nilBytes), inputSHA256: getSHA256Hash(nilBytes), inputDataSize: int64(len(nilBytes)), expectedMd5: getMD5Hash(nilBytes)},
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 25.8K bytes - Viewed (0) -
cmd/test-utils_test.go
// Save for subsequent use var hashedPayload string var md5Base64 string switch { case body == nil: hashedPayload = getSHA256Hash([]byte{}) default: payloadBytes, err := io.ReadAll(body) if err != nil { return nil, err } hashedPayload = getSHA256Hash(payloadBytes) md5Base64 = getMD5HashBase64(payloadBytes) } // Seek back to beginning. if body != nil { body.Seek(0, 0)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/erasure-multipart.go
if len(slc) == 2 { uploadUUID = slc[1] } } return pathJoin(er.getMultipartSHADir(bucket, object), uploadUUID) } func (er erasureObjects) getMultipartSHADir(bucket, object string) string { return getSHA256Hash([]byte(pathJoin(bucket, object))) } // checkUploadIDExists - verify if a given uploadID exists and is valid.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0)