Esempio n. 1
0
 protected override void HashCore(byte[] rgb, int ib, int cb)
 {
     if (bHashing == false)
     {
         hash1.TransformBlock(rgbInner, 0, 128, rgbInner, 0);
         bHashing = true;
     }
     hash1.TransformBlock(rgb, ib, cb, rgb, ib);
 }
Esempio n. 2
0
 protected override byte[] HashFinal()
 {
     if (bHashing == false)
     {
         hash1.TransformBlock(rgbInner, 0, 128, rgbInner, 0);
         bHashing = true;
     }
     // Finalize the original hash.
     hash1.TransformFinalBlock(new byte[0], 0, 0);
     // Write the outer array.
     hash2.TransformBlock(rgbOuter, 0, 128, rgbOuter, 0);
     // Write the inner hash and finalize the hash.
     hash2.TransformFinalBlock(hash1.Hash, 0, hash1.Hash.Length);
     bHashing = false;
     return(hash2.Hash);
 }