Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseCiphertext (0.05 sec)

  1. internal/kms/secret-key.go

    	return mac.Sum(make([]byte, 0, mac.Size())), nil
    }
    
    // parseCiphertext parses and converts a ciphertext into
    // the format expected by a secretKey.
    //
    // Previous implementations of the secretKey produced a structured
    // ciphertext. parseCiphertext converts all previously generated
    // formats into the expected format.
    func parseCiphertext(b []byte) ([]byte, kms.SecretKeyType) {
    	if len(b) == 0 {
    		return b, kms.AES256
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Apr 21 16:23:51 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  2. internal/kms/kms.go

    }
    
    func (c *kmsConn) Decrypt(ctx context.Context, req *DecryptRequest) ([]byte, error) {
    	aad, err := req.AssociatedData.MarshalText()
    	if err != nil {
    		return nil, err
    	}
    
    	ciphertext, _ := parseCiphertext(req.Ciphertext)
    	resp, err := c.client.Decrypt(ctx, c.enclave, &kms.DecryptRequest{
    		Name:           req.Name,
    		Ciphertext:     ciphertext,
    		AssociatedData: aad,
    	})
    	if err != nil {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Thu Apr 24 15:33:57 UTC 2025
    - 11.4K bytes
    - Viewed (0)
Back to top