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

Fix: ensure unique iv generation for GCM encryption to prevent reuse error #344

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

AssahBismarkabah
Copy link
Collaborator

Added SecureRandom to JceCMSContentEncryptorBuilder in CMSEncryptionServiceImpl to ensure unique IV generation for each encryption operation.

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.76%. Comparing base (ea27fc6) to head (f4e1e21).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #344   +/-   ##
==========================================
  Coverage      86.76%   86.76%           
  Complexity         1        1           
==========================================
  Files            164      164           
  Lines           3347     3348    +1     
  Branches         217      217           
==========================================
+ Hits            2904     2905    +1     
  Misses           309      309           
  Partials         134      134           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Aug 12, 2024

@AssahBismarkabah
Copy link
Collaborator Author

resolved @francis-pouatcha

@AssahBismarkabah AssahBismarkabah merged commit 32d36bc into develop Aug 13, 2024
4 checks passed
@AssahBismarkabah AssahBismarkabah deleted the gcm-cipher-cannot-be-reused-for-encryption branch August 13, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Jackson writeValue to stream causes "GCM cipher cannot be reused for encryption"
2 participants