I am working on calculating Deduplication percentage. Given two files as input and using hash. For that first I have to calculate the hash of the file preferably in C/C++. If anyone has the code can you please post it here. It would be very helpful.
Asked
Active
Viewed 862 times
-8
-
1possible duplicate of [In C++, How to get MD5 hash of a file?](http://stackoverflow.com/questions/1220046/in-c-how-to-get-md5-hash-of-a-file) – M'vy Aug 11 '14 at 08:40
-
Another possible duplicate: http://stackoverflow.com/questions/10324611/how-to-calculate-the-md5-hash-of-a-large-file-in-c – roelofs Aug 11 '14 at 08:40
-
1What type of hash? One of the standard hashes (like MD5 or SHA1), or something of your own design? – Some programmer dude Aug 11 '14 at 08:41
-
And please stick with one language, the solution(s) might be considerably different depending on language. – Some programmer dude Aug 11 '14 at 08:41
-
@JoachimPileborg Md5 in c – user3532445 Aug 11 '14 at 09:18
-
@roelofs openssl/md5.h:No such file or directory this is the error,with the code you mentioned. – user3532445 Aug 11 '14 at 09:45
-
Have you got the openssl-dev package installed? (assuming you're working in a linux environment) – roelofs Aug 11 '14 at 10:36
1 Answers
2
Boost hash You could use this, but any other librairy would work. Looks like you did poor research.