Ejemplo n.º 1
0
 protected override void HashCore(byte[] rgb, int ibStart, int cbSize)
 {
     if (_impl != null)
     {
         _impl.TransformBlock(rgb, ibStart, cbSize, null, 0);
     }
     else
     {
         _HashData(rgb, ibStart, cbSize);
     }
 }
Ejemplo n.º 2
0
 public void FIPS186_e(string testName, SHA256 hash, byte[] input, byte[] result)
 {
     byte[] copy = new byte [input.Length];
     for (int i=0; i < input.Length - 1; i++)
         hash.TransformBlock (input, i, 1, copy, i);
     byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
     // LAMESPEC or FIXME: TransformFinalBlock doesn't return HashValue !
     // AssertEquals (testName + ".e.1", result, output);
     Assert.IsNotNull (output, testName + ".e.1");
     Assert.AreEqual (result, hash.Hash, testName + ".e.2");
     // required or next operation will still return old hash
     hash.Initialize ();
 }
Ejemplo n.º 3
0
 private void ProcessBlock()
 {
     sha.TransformBlock(_Buffer, 0, _Pos, null, -1);
     _Pos = 0;
 }