mscorlib(4.0.0.0) API with additions
SHA1CryptoServiceProvider.cs
2 
4 {
6  [ComVisible(true)]
7  public sealed class SHA1CryptoServiceProvider : SHA1
8  {
9  [SecurityCritical]
10  private SafeHashHandle _safeHashHandle;
11 
13  [SecuritySafeCritical]
15  {
16  _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, 32772);
17  }
18 
19  [SecuritySafeCritical]
20  protected override void Dispose(bool disposing)
21  {
22  if (_safeHashHandle != null && !_safeHashHandle.IsClosed)
23  {
24  _safeHashHandle.Dispose();
25  }
26  base.Dispose(disposing);
27  }
28 
30  [SecuritySafeCritical]
31  public override void Initialize()
32  {
33  if (_safeHashHandle != null && !_safeHashHandle.IsClosed)
34  {
35  _safeHashHandle.Dispose();
36  }
37  _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, 32772);
38  }
39 
40  [SecuritySafeCritical]
41  protected override void HashCore(byte[] rgb, int ibStart, int cbSize)
42  {
43  Utils.HashData(_safeHashHandle, rgb, ibStart, cbSize);
44  }
45 
46  [SecuritySafeCritical]
47  protected override byte[] HashFinal()
48  {
49  return Utils.EndHash(_safeHashHandle);
50  }
51  }
52 }
Definition: __Canon.cs:3
override void HashCore(byte[] rgb, int ibStart, int cbSize)
When overridden in a derived class, routes data written to the object into the hash algorithm for com...
SHA1CryptoServiceProvider()
Initializes a new instance of the T:System.Security.Cryptography.SHA1CryptoServiceProvider class.
override void Dispose(bool disposing)
Releases the unmanaged resources used by the T:System.Security.Cryptography.HashAlgorithm and optiona...
override void Initialize()
Initializes an instance of T:System.Security.Cryptography.SHA1CryptoServiceProvider.
override byte [] HashFinal()
When overridden in a derived class, finalizes the hash computation after the last data is processed b...
Computes the T:System.Security.Cryptography.SHA1 hash for the input data.
Definition: SHA1.cs:7
Computes the T:System.Security.Cryptography.SHA1 hash value for the input data using the implementati...