Ejemplo n.º 1
0
 public void RIPEMD160_e(string testName, RIPEMD160 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);
     }
     hash.TransformFinalBlock(input, input.Length - 1, 1);
     AssertEquals(testName + ".e", result, hash.Hash);
     // required or next operation will still return old hash
     hash.Initialize();
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Updates the hash with data.
 /// </summary>
 /// <param name="data">Data buffer.</param>
 /// <param name="len">Length of buffer to hash.</param>
 public void Update(byte[] data, uint len)
 {
     ripemd160Provider.TransformBlock(data, 0, (int)len, data, 0);
 }