Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8598313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:07:23+00:00 2026-06-12T01:07:23+00:00

I have two strings as below Str1: 1234\099 Str2: 123499 If I calculate MD5

  • 0

I have two strings as below
Str1: 1234\099
Str2: 123499

If I calculate MD5 on these string using unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);

Will the function MD5 calculate the hash for first 4 bytes of Str1 or would it take the complete string “1234\099”.

Will the MD5 of Str1 and Str2 be same or different????

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:07:24+00:00Added an answer on June 12, 2026 at 1:07 am

    Yes, Michael is right. I executed the below program and it seems that MD5 calculation takes place on second argument irrespective of what is in the string.

    #include <stdio.h>
    #include <openssl/md5.h>
    
    int main() { <br>
        char *p = NULL;<br>
        char *c = NULL;<br>
        char *q = NULL;<br>
    
        p = malloc(10*(sizeof(char)));
        strncpy(p, "ABCDEDFGO", 9);
        c = malloc(200*(sizeof(char)));
        memset(c,0, 200);
    
        p[3] = '\0';
    
        q = MD5(p, 9, c);
        printf("\n For 9 bytes hash %x", *c);
        q = MD5(p, 4, c);
        printf("\n For 4 bytes hash %x", *c);
        q = MD5(p, 3, c);
        printf("\n For 3 bytes hash %x", *c);
    
        free(c);
        return (0);
    }
    

    For 9 bytes hash ffffffc9
    For 4 bytes hash ffffffe5
    For 3 bytes hash ffffff90

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two strings str1 and str2 . Check both of them and see
Okey, I have two strings containing numbers like shown here using debugger: String 1
Let's consider I have two comma separated strings as written below. string name =
I have two migrations as below: CreateGroups t.string :name t.string :groupkey CreateEvents t.string :name
I have two migrations as below: CreateGroups t.string :name t.string :groupkey CreateEvents t.string :name
I have two strings String s1=426F62; String s2=457665; The strings are in hex representation.
Explaining it further Assume i have two strings like below I am a super
Let's say I have these two strings: 5/15/1983 and 1983.05.15. Assume that all characters
Inspired by these two questions: String manipulation: calculate the "similarity of a string with
Ok So I have two strings. The First String is a word, the second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.