md5/sha1 Openssl libraries gives different output for binary files
I am using OpenSSL libraries (md5/sha1) for my security application, where I need to find out hash values for files in a directory. I am comparing my program's output with linux commands md5sum and sha1sum. For text files I am getting correct results, where in for binary files (like .tar.gz, .out) I am getting different hash values from both md5sum/sha1sum commands and my own program. I have tried to figure out the problem, but failed. What could be the problem ?
I am writing this application in C++.
Last edited by return.c; 03-24-2008 at 03:28 AM.
|