(dst, ciphertext []byte)
| 103 | } |
| 104 | |
| 105 | func (s *aes128gcmRekey) Decrypt(dst, ciphertext []byte) ([]byte, error) { |
| 106 | seq, err := s.inCounter.Value() |
| 107 | if err != nil { |
| 108 | return nil, err |
| 109 | } |
| 110 | plaintext, err := s.inAEAD.Open(dst, seq, ciphertext, nil) |
| 111 | if err != nil { |
| 112 | return nil, ErrAuth |
| 113 | } |
| 114 | s.inCounter.Inc() |
| 115 | return plaintext, nil |
| 116 | } |