Problem
The project currently lacks automated tests. Refactoring code poses a risk of breaking the encryption logic.
Solution
Create a test module in main.rs or a separate tests/ directory.
Tests Needed
- Roundtrip Test: Encrypt a dummy text -> Decrypt it -> Assert strict equality.
- Wrong Password Test: Ensure decryption fails gracefully with an incorrect key.
- Corrupt Data Test: Modify one byte of the encrypted stream and ensure Poly1305 MAC check fails.