Beispiel #1
0
 // Prepare the hash for the initial call to "HashCore" or "HashFinal".
 private void Prepare()
 {
     if (alg == null)
     {
         alg = SHA1.Create(algName);
         if (KeyValue != null)
         {
             alg.InternalHashCore(KeyValue, 0, KeyValue.Length);
         }
     }
 }
	// Prepare the hash for the initial call to "HashCore" or "HashFinal".
	private void Prepare()
			{
				if(alg == null)
				{
					alg = SHA1.Create(algName);
					if(KeyValue != null)
					{
						alg.InternalHashCore(KeyValue, 0, KeyValue.Length);
					}
				}
			}
Beispiel #3
0
 // Write data to the underlying hash algorithm.
 protected override void HashCore(byte[] array, int ibStart, int cbSize)
 {
     Prepare();
     alg.InternalHashCore(array, ibStart, cbSize);
 }