Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. internal/kms/secret-key.go

    	return nil, ErrNotSupported
    }
    
    // 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 8.3K 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, &kms.DecryptRequest{
    		Enclave:        c.enclave,
    		Name:           req.Name,
    		Ciphertext:     ciphertext,
    		AssociatedData: aad,
    	})
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top