Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I agree with Henk Holtermans Response. You'll have to do the split yourself. What you can do however is to not calculate the complete hash with a single ComputeHash call, but to do it in chunks of Bytes with <code>TransformBlock</code> calls. <a href="https://stackoverflow.com/questions/2124468/possible-to-calculate-md5-or-other-hash-with-buffered-reads">See here for an example</a>.</p> <p>With this you can yourself instantiate a buffer of a size and give it as Parameters to the consequent parallel TransformBlock Calls.</p> <p>Edit: here is some code that does the Job</p> <pre><code> static void Hash2Md5inParallel() { string strFullPath = YourFilePathGoesHere; byte[] Buffer = new Byte[1000]; //Instantiate Buffer to copy bytes. byte[] DumpBuffer = new Byte[1000]; //Send output to bin. System.Security.Cryptography.MD5 md5_1 = new System.Security.Cryptography.MD5CryptoServiceProvider(); System.Security.Cryptography.MD5 md5_2 = new System.Security.Cryptography.MD5CryptoServiceProvider(); System.IO.FileStream file = new System.IO.FileStream(strFullPath, FileMode.Open); file.Seek(1000, SeekOrigin.Begin); //skip some chars if need be int BytesToHash = 0; do { BytesToHash = file.Read(Buffer, 0, 1000); md5_1.TransformBlock(Buffer, 0, BytesToHash, DumpBuffer, 0); //enter some code to skip some bytes for the other hash if you like... md5_2.TransformBlock(Buffer, 0, BytesToHash, DumpBuffer, 0); } while (BytesToHash &gt; 0); //Repeat until no more bytes. //call TransformFinalBlock to finish hashing - empty block is enough md5_1.TransformFinalBlock(new byte[0], 0, 0); md5_2.TransformFinalBlock(new byte[0], 0, 0); //Get both Hashs. byte[] hash1 = md5_1.Hash; byte[] hash2 = md5_2.Hash; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload