-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
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
|
||
import java.security.NoSuchAlgorithmException; | ||
|
||
public interface SecureHash { |
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.
Thoughts about removing this interface? I feel that it could be removed since we aren't using any third-party libraries in the HashHelper
implementation.
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 don't feel too strongly in either case. I think it could potentially be helpful if we wanted to use a third-party library in the future or expand on it.
etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/utils/security/HashHelper.java
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 |
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