Skip to content

RANGER-5498: Use provided saltSize parameter at all places in generat…#860

Merged
vikaskr22 merged 1 commit intoapache:masterfrom
vikaskr22:master-RANGER-5498
Feb 26, 2026
Merged

RANGER-5498: Use provided saltSize parameter at all places in generat…#860
vikaskr22 merged 1 commit intoapache:masterfrom
vikaskr22:master-RANGER-5498

Conversation

@vikaskr22
Copy link
Contributor

What changes were proposed in this pull request?

RangerMasterKey has generateSalt(int saltSize) method. In case of FIPS, if user provided saltSize is small, then code calculates the compliant salt size and then generates the salt. The parameter of the method contains the new calculated size and this method is expected to use this size only.

While copying the generated salt to target byte[], it was using the static member instance with the same variable name. Right now it is working because both has same value but it may create problem if static member and new calculated value starts containing different value. So to avoid such issues and as a good coding practice, code is updated to use the provided parameter only.

How was this patch tested?

  • mvn build is successful
  • All KMS UTs passed.

@vikaskr22 vikaskr22 merged commit 05035e5 into apache:master Feb 26, 2026
4 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