- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for SealETag (0.09 sec)
-
internal/crypto/key.go
mac.Write(bin[:]) mac.Sum(partKey[:0]) return partKey } // SealETag seals the etag using the object key. // It does not encrypt empty ETags because such ETags indicate // that the S3 client hasn't sent an ETag = MD5(object) and // the backend can pick an ETag value. func (key ObjectKey) SealETag(etag []byte) []byte { if len(etag) == 0 { // don't encrypt empty ETag - only if client sent ETag = MD5(object)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Mar 19 20:28:10 UTC 2024 - 6.4K bytes - Viewed (0) -
internal/crypto/key_test.go
key[i] = byte(i) } for i, etag := range sealUnsealETagTests { tag, err := hex.DecodeString(etag) if err != nil { t.Errorf("Test %d: failed to decode etag: %s", i, err) } sealedETag := key.SealETag(tag) unsealedETag, err := key.UnsealETag(sealedETag) if err != nil { t.Errorf("Test %d: failed to decrypt etag: %s", i, err) } if !bytes.Equal(unsealedETag, tag) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 6.7K bytes - Viewed (0) -
cmd/object-api-utils.go
} func sealETag(encKey crypto.ObjectKey, md5CurrSum []byte) []byte { var emptyKey [32]byte if bytes.Equal(encKey[:], emptyKey[:]) { return md5CurrSum } return encKey.SealETag(md5CurrSum) } func sealETagFn(key crypto.ObjectKey) SealMD5CurrFn { fn := func(md5sumcurr []byte) []byte { return sealETag(key, md5sumcurr) } return fn }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0)