Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #2

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Add tests #2

merged 6 commits into from
Feb 6, 2025

Conversation

wneessen
Copy link
Owner

@wneessen wneessen commented Feb 6, 2025

No description provided.

Renamed 'defaultArgon2Treads' to 'defaultArgon2Threads' to correct a spelling error. Updated all instances to ensure consistency and prevent potential confusion in the codebase.
Introduce comprehensive tests for Argon2 configuration, encoding, and decoding. Includes validation of default and custom settings, error handling for invalid inputs, and key derivation correctness with expected outputs.
Improved error handling by returning detailed errors when failing to read encryption parameters. Replaced direct EOF comparison with errors.Is for better compatibility and clarity. This ensures more robust and descriptive error messages during the decryption process.
Added detailed comments to error variables to provide clearer context on their usage and potential causes. This improves code readability and aids future debugging efforts.
    The `t.Log(err)` statement was unnecessary as the error is already checked and handled in the test. Removing it improves code clarity and avoids clutter in test outputs.
The test for encoding with an invalid memory setting was removed as it is no longer relevant or aligns with the current implementation. This simplifies the test suite by eliminating unnecessary or outdated cases.
@wneessen wneessen merged commit 070b199 into main Feb 6, 2025
@wneessen wneessen deleted the add-tests branch February 6, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant