Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for sartrey (0.17 sec)

  1. internal/crypto/sse.go

    // multi-part PUT request. It derives an unique encryption key from
    // the partID and the object key.
    func EncryptMultiPart(r io.Reader, partID int, key ObjectKey) io.Reader {
    	partKey := key.DerivePartKey(uint32(partID))
    	return EncryptSinglePart(r, ObjectKey(partKey))
    }
    
    // DecryptSinglePart decrypts an io.Writer which must an object
    // uploaded with the single-part PUT API. The offset and length
    // specify the requested range.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  2. cmd/metacache-set.go

    		return 0, nil
    	}
    	o.debugln("searching for ", search)
    	var tmp metacacheBlock
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	i := 0
    	for {
    		partKey := fmt.Sprintf("%s-metacache-part-%d", ReservedMetadataPrefixLower, i)
    		v, ok := fi.Metadata[partKey]
    		if !ok {
    			o.debugln("no match in metadata, waiting")
    			return -1, io.ErrUnexpectedEOF
    		}
    		err := json.Unmarshal([]byte(v), &tmp)
    		if !ok {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:59:08 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  3. internal/crypto/key_test.go

    		expectedPartKey, err := hex.DecodeString(test.PartKey)
    		if err != nil {
    			t.Fatalf("Test %d failed to decode expected part-key: %v", i, err)
    		}
    		partKey := key.DerivePartKey(test.PartID)
    		if !bytes.Equal(partKey[:], expectedPartKey) {
    			t.Errorf("Test %d derives wrong part-key: got '%s' want: '%s'", i, hex.EncodeToString(partKey[:]), test.PartKey)
    		}
    	}
    }
    
    var sealUnsealETagTests = []string{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. internal/crypto/key.go

    // DerivePartKey derives an unique 256 bit key from an ObjectKey and the part index.
    func (key ObjectKey) DerivePartKey(id uint32) (partKey [32]byte) {
    	var bin [4]byte
    	binary.LittleEndian.PutUint32(bin[:], id)
    
    	mac := hmac.New(sha256.New, key[:])
    	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
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top