What is the most sought after method of determining a files integrity after transferring over the network via ruby?
I am attempting to write software which will break up a file into chunks, calculate the checksums of the chunks, and then send the chunks of file along with checksums to a client (probably not in that order or method, but calculating of checksums will be included none the less).
I am looking for hashing functions that are native to rubies libraries and will be able to calculate in a timely matter depending on the chunk size. The files being transferred are normally around 500mb but sometimes up to or larger than 7gb, so the hashing function must be able to chew through a small number of chunks or a large number (depending on chunk size) fairly quickly.
I have looked into crc32 via Zlib and MD5 from digest, but I am wondering if there are other functions I should look into that may be faster or which of these would be the best suited for the task.
Aucun commentaire:
Enregistrer un commentaire