Hashing

Hello, can someone help me with a program to implement hashing of text files in a directory to find files with the same content?
If you want to learn about popular hash algorithms (such as MD5 and SHA-1):
http://en.wikipedia.org/wiki/Cryptographic_hash_function

If you want to use a library for C++ that implements them:
http://www.cryptopp.com/

badgirl wrote:
Hello, can someone help me with a program to implement hashing of text files in a directory to find files with the same content?

On its own, this isn't even a job for C++: it would make more sense to just write a script that used an external utility, such as md5sum.

In most Linux distros, you should have the hash utilities readily available via the coreutils package.
In Windows, you'll either need to download a standalone program, or the ported coreutils:

http://www.fourmilab.ch/md5/
http://gnuwin32.sourceforge.net/packages/coreutils.htm

Writing scripts:
http://en.wikipedia.org/wiki/Batch_file
http://en.wikipedia.org/wiki/Shell_script
Last edited on
Topic archived. No new replies allowed.