Skip to content

Add MD5 hash function implementation for generating message digests #5335

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

Closed
wants to merge 4 commits into from

Conversation

karthikyandrapu
Copy link

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.

Project coverage is 42.77%. Comparing base (98bee26) to head (ed97e40).

Files Patch % Lines
src/main/java/com/thealgorithms/hashes/MD5.java 0.00% 16 Missing ⚠️
src/main/java/com/thealgorithms/hashes/SHA1.java 0.00% 16 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5335      +/-   ##
============================================
- Coverage     42.87%   42.77%   -0.10%     
  Complexity     2661     2661              
============================================
  Files           522      524       +2     
  Lines         15483    15515      +32     
  Branches       2950     2952       +2     
============================================
- Hits           6638     6637       -1     
- Misses         8560     8593      +33     
  Partials        285      285              

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

public static String getMd5(String input) {
try {
// Create a MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");

Check failure

Code scanning / CodeQL

Use of a broken or risky cryptographic algorithm High

Cryptographic algorithm
MD5
is weak and should not be used.
public static String getMd5(String input) {
try {
// Create a MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");

Check failure

Code scanning / CodeQL

Use of a broken or risky cryptographic algorithm High test

Cryptographic algorithm
MD5
is weak and should not be used.
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