(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestEncryptAES_DifferentNonces(t *testing.T) { |
| 26 | key := "test-key" |
| 27 | plaintext := "same-text" |
| 28 | |
| 29 | enc1, err := EncryptAES(key, plaintext) |
| 30 | require.NoError(t, err) |
| 31 | enc2, err := EncryptAES(key, plaintext) |
| 32 | require.NoError(t, err) |
| 33 | |
| 34 | // Same plaintext should produce different ciphertexts due to random nonce |
| 35 | assert.NotEqual(t, enc1, enc2) |
| 36 | } |
| 37 | |
| 38 | func TestDecryptAES_TamperedCiphertext(t *testing.T) { |
| 39 | key := "test-key" |
nothing calls this directly
no test coverage detected