- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for SealETag (0.06 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)