Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for DecryptBuffer (0.15 sec)

  1. internal/crypto/key.go

    		sha := sha256.New()
    		sha.Write(extKey)
    		sha.Write(sealedKey.IV[:])
    		unsealConfig = sio.Config{MinVersion: sio.Version10, Key: sha.Sum(nil), CipherSuites: fips.DARECiphers()}
    	}
    
    	if out, err := sio.DecryptBuffer(key[:0], sealedKey.Key[:], unsealConfig); len(out) != 32 || err != nil {
    		return ErrSecretKeyMismatch
    	}
    	return nil
    }
    
    // DerivePartKey derives an unique 256 bit key from an ObjectKey and the part index.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 19 20:28:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. internal/etag/etag.go

    	if !etag.IsEncrypted() {
    		return etag, nil
    	}
    	mac := hmac.New(sha256.New, key)
    	mac.Write([]byte(HMACContext))
    	decryptionKey := mac.Sum(nil)
    
    	plaintext := make([]byte, 0, 16)
    	etag, err := sio.DecryptBuffer(plaintext, etag, sio.Config{
    		Key:          decryptionKey,
    		CipherSuites: fips.DARECiphers(),
    	})
    	if err != nil {
    		return nil, err
    	}
    	return etag, nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Mar 10 21:09:36 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. cmd/encryption-v1.go

    		}
    		key, err := decryptObjectMeta(key, o.Bucket, o.Name, o.UserDefined)
    		if err != nil {
    			return nil, err
    		}
    		mac := hmac.New(sha256.New, key)
    		mac.Write([]byte(baseKey))
    		return sio.DecryptBuffer(nil, input, sio.Config{Key: mac.Sum(nil), CipherSuites: fips.DARECiphers()})
    	}
    }
    
    // decryptChecksums will attempt to decode checksums and return it/them if set.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 37.1K bytes
    - Viewed (0)
Back to top