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

  • SEARCH
  • Home
  • 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 446143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:26:29+00:00 2026-05-12T21:26:29+00:00

I recently have a problem with a crypto library which produces bad md5 output.

  • 0

I recently have a problem with a crypto library which produces bad md5 output. Instead of 32 digits it returns 30.

As we don’t use unit test, this problem was quite a headache to solve… because we assumed that md5 string was correct and look for bugs in other places.

That make me realize of the real value of unit tests (unit test first, tdd later).

But I’m not sure how to test cryptographic methods well enough. How do you get proper expected values?

EDIT: Thanks for the answers, I think I didn’t explain it enough.

The problem was with a third party tool wich produces bad md5 output. Then, how do you get that assert value? I know it mustn’t change, just I don’t get how to obtain it from a reliable source.

  • 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-05-12T21:26:29+00:00Added an answer on May 12, 2026 at 9:26 pm

    Known correct data for cryptographic algorithms is usually called test vectors. So google "MD5 test vectors" to get a ton of good input data for your tests.

    The most authoritative resource for test vectors is of course the document defining the algorithm. Most standards documents will include a set of test vectors. For instance, RFC 1321 contains the following set of test data:

    MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
    MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
    MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
    MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0
    MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
    MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
      = d174ab98d277d9f5a5611c2c9f419d9f
    MD5 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") 
      = 57edf4a22be3c955ac49da2e2107b67a
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

recently I started to use XNA with MonoMac. I have problem with classes. I
I have got a strange problem about in_array recently which I cannot understand. e.g.
recently I have experienced a problem which is really strange. I have a c#
I have recently ran into a problem that would not allow me to use
I have a Magento 1.5.0.1 site and have recently come across a problem which
I have a strange problem which seems to have recently appeared. I used to
I recently have a problem that my java code works perfectly ok on my
i am new to C and recently i have a problem with a strcat
I have recently stumbled upon a problem with selecting relationship details from a 1
I have recently started programming in WPF and bumped into the following problem. I

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.