MessageDigest MD5 generation of Multipart Huge file

520 views Asked by At

I wish to generate an MD5 hash of a very large file using MessageDigest.

However, because the file is so big, i never have access to the complete stream of bytes. I only have access to N segments of the file. (Processed using multipart uploads).

In fact, the segments are processed on multiple servers, so i can't pass a MessageDigest instance around from segment to segment.

I can generate an MD5 hash of each of the segments, and I know the order in which the segments will be reassembled into the final file.

Is there a way to combine the MD5 hashes of the segments, to get the true MD5 of the entire file? (The segments are combined in the database with DBMS_LOB.APPEND.) I suppose i could try writing some heinous PL/SQL to calculate it thru a stored procedure, but trying to avoid that.

0

There are 0 answers