-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use SHA3-512 #1594
Use SHA3-512 #1594
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Co-authored-by: jcrichlake <[email protected]>
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/orders/SendOrderUseCase.java
Fixed
Show fixed
Hide fixed
Co-authored-by: jcrichlake <[email protected]>
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Fixed
Show fixed
Hide fixed
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Dismissed
Show dismissed
Hide dismissed
Co-authored-by: jcrichlake <[email protected]>
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Outdated
Show resolved
Hide resolved
Co-authored-by: jcrichlake <[email protected]>
Co-authored-by: jcrichlake <[email protected]>
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Outdated
Show resolved
Hide resolved
An instance of Can you give me examples of what you're talking about? Is it something like |
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Outdated
Show resolved
Hide resolved
MessageLink and HttpEndpoint both have hashCode() that is overrode. Just wanted to double check it those don't need altering too. |
Those do not need to be changed. The way hashCode works today in the context of how it is normally used (comparing whether two objects are equal, IIRC) is totally fine. But subsequently using hashCode for storing in a database where the original data is sensitive is perhaps not the best and why we are moving away from using hashCode in this context. |
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Fixed
Show fixed
Hide fixed
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/SecureHash.java
Outdated
Show resolved
Hide resolved
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Outdated
Show resolved
Hide resolved
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this has been merged, but let's make one more improvement, @pluckyswan.
|
||
private static final HashHelper INSTANCE = new HashHelper(); | ||
|
||
public static HashHelper getInstance() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind making a follow-up PR to add a private constructor? I'm happy to collaborate with you on that.
Description
Generate a SHA3-512 hash for orders and results instead of using hashCode. Added unit tests for the new method generateHash.
Issue
#824
Checklist
Note: You may remove items that are not applicable