I recently had a problem with a crypto library that creates md5 bad output. Instead of 32 digits, 30 is returned.
Since we are not using unit test, this problem was quite a headache to solve ... because we assumed that the md5 line is correct and is looking for errors elsewhere.
This makes me realize 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 the correct expected values?
EDIT: Thanks for the answers, I think I haven’t explained it enough.
The problem was using a third-party tool that produces md5 bad output. Then how do you get that value? I know that this should not change, I just don’t understand how to get it from a reliable source.
source
share