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

[ADP-322] Simplify functions within AES256CBC. #4581

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented May 8, 2024

This PR:

  • uses function stripPrefix to replace usages of splitAt that require further equality checks.
  • defines a named constant saltLengthBytes = 8 to avoid repetition of the magic constant 8.

Issue

ADP-322

This helps us to avoid repeating the magic number `8` in multiple
places.
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/adp-322/add-metadata-encryption-to-api-suggestions branch from 7ca6ba7 to e683bba Compare May 8, 2024 06:15
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/adp-322/add-metadata-encryption-to-api-suggestions branch from e683bba to 49f2040 Compare May 8, 2024 06:19
@jonathanknowles jonathanknowles changed the title [ADP-322] Suggestions for PR #4555 [ADP-322] Simplify treatment of salts in module AES256CBC. May 8, 2024
@jonathanknowles jonathanknowles changed the title [ADP-322] Simplify treatment of salts in module AES256CBC. [ADP-322] Simplify functions within AES256CBC. May 8, 2024
Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! Let's wait for the CI green and merge 👍

@paweljakubas paweljakubas merged commit eda0d55 into paweljakubas/adp-322/add-metadata-encryption-to-api May 8, 2024
3 checks passed
@paweljakubas paweljakubas deleted the jonathanknowles/adp-322/add-metadata-encryption-to-api-suggestions branch May 8, 2024 07:09
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.

None yet

2 participants