Beispiel #1
0
 protected override void HashCore(byte[] rgb, int ib, int cb)
 {
     if (m_hashing == false)
     {
         m_hash1.TransformBlock(m_inner, 0, m_inner.Length, m_inner, 0);
         m_hashing = true;
     }
     m_hash1.TransformBlock(rgb, ib, cb, rgb, ib);
 }
Beispiel #2
0
 protected override byte[] HashFinal()
 {
     if (m_hashing == false)
     {
         m_hash1.TransformBlock(m_inner, 0, m_inner.Length, m_inner, 0);
         m_hashing = true;
     }
     // finalize the original hash
     m_hash1.TransformFinalBlock(EmptyArray <Byte> .Value, 0, 0);
     byte[] hashValue1 = m_hash1.HashValueSHA224;
     // write the outer array
     m_hash2.TransformBlock(m_outer, 0, m_outer.Length, m_outer, 0);
     // write the inner hash and finalize the hash
     m_hash2.TransformBlock(hashValue1, 0, hashValue1.Length, hashValue1, 0);
     m_hashing = false;
     m_hash2.TransformFinalBlock(EmptyArray <Byte> .Value, 0, 0);
     return(m_hash2.HashValueSHA224);
 }