Skip to content

[TEST] Implement Unit Tests for Encryption/Decryption flow #8

@aarchiev

Description

@aarchiev

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

  1. Roundtrip Test: Encrypt a dummy text -> Decrypt it -> Assert strict equality.
  2. Wrong Password Test: Ensure decryption fails gracefully with an incorrect key.
  3. Corrupt Data Test: Modify one byte of the encrypted stream and ensure Poly1305 MAC check fails.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions