Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i learned the Rsync Algorithm (7stpes).
but how to generate the hash code for the one file using windows c++.
Posted

1 solution

Go to rsync official site...


http://rsync.samba.org download the source code and in checksum.c there is a function...

C++
void file_checksum(char *fname, char *sum, OFF_T size)


which actually computes checksum and md4 hash for a file. You need to port few functions like opening file and shared memory. use CreateFileMapping, MapViewOfFile, UnMapViewOfFile instead.If you don't want to write all that you can download my CSharedMemory from here...


Persistant Hash Table: Part 2[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900