Files
2026-06-04 11:42:34 +02:00

50 lines
2.0 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Computes the <see cref="T:System.Security.Cryptography.SHA1" /> hash for the input data using the managed library. </summary>
// Token: 0x0200052D RID: 1325
[ComVisible(true)]
public class SHA1Managed : SHA1
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.SHA1Managed" /> class.</summary>
/// <exception cref="T:System.InvalidOperationException">This class is not compliant with the FIPS algorithm.</exception>
// Token: 0x0600309C RID: 12444 RVA: 0x000A6A6C File Offset: 0x000A4C6C
public SHA1Managed()
{
this.sha = new SHA1Internal();
}
/// <summary>Routes data written to the object into the <see cref="T:System.Security.Cryptography.SHA1Managed" /> hash algorithm for computing the hash.</summary>
/// <param name="rgb">The input data. </param>
/// <param name="ibStart">The offset into the byte array from which to begin using data. </param>
/// <param name="cbSize">The number of bytes in the array to use as data. </param>
// Token: 0x0600309D RID: 12445 RVA: 0x000A6A80 File Offset: 0x000A4C80
protected override void HashCore(byte[] rgb, int ibStart, int cbSize)
{
this.State = 1;
this.sha.HashCore(rgb, ibStart, cbSize);
}
/// <summary>Returns the computed <see cref="T:System.Security.Cryptography.SHA1" /> hash value after all data has been written to the object.</summary>
/// <returns>The computed hash code.</returns>
// Token: 0x0600309E RID: 12446 RVA: 0x000A6A98 File Offset: 0x000A4C98
protected override byte[] HashFinal()
{
this.State = 0;
return this.sha.HashFinal();
}
/// <summary>Initializes an instance of <see cref="T:System.Security.Cryptography.SHA1Managed" />.</summary>
// Token: 0x0600309F RID: 12447 RVA: 0x000A6AAC File Offset: 0x000A4CAC
public override void Initialize()
{
this.sha.Initialize();
}
// Token: 0x040013CF RID: 5071
private SHA1Internal sha;
}
}