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

Make sure that all test cases in testAeadEncryption are run. #1282

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

juergw
Copy link
Contributor

@juergw juergw commented Dec 19, 2024

Some test cases are now not run, because they use the same IV
as the previous test case. And that results in an
InvalidAlgorithmParameterException that gets ignored.

To not re-use IVs twice, we now run init with a different IV first. And we don't ignore InvalidAlgorithmParameterException caused by IV reuse.

If the user wants to encrypt and calls doFinal(input, 123, 0); without a prior call to update,
it currently fails with an array out of bounds exception.

Instead, it should encrypt the empty string.
Some tests are now not run, because they use the same IV
as the previous test case. And that results in an
InvalidAlgorithmParameterException that gets ignored.

To not re-use IVs twice, we now run init with a different IV first.
And we don't ignore InvalidAlgorithmParameterException caused by IV reuse.
@prbprbprb prbprbprb merged commit a1e04b4 into google:master Dec 19, 2024
4 of 6 checks passed
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.

2 participants