Files
Apr2020-Cpp2Il-Dump/System.Core/System/Security/Cryptography/IncrementalHash.cs
T
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

141 lines
7.4 KiB
C#

using System;
using Cpp2IlInjected;
namespace System.Security.Cryptography
{
/// <summary>Provides support for computing a hash or Hash-based Message Authentication Code (HMAC) value incrementally across several segments.</summary>
// Token: 0x02000013 RID: 19
[Token(Token = "0x2000013")]
public sealed class IncrementalHash : IDisposable
{
// Token: 0x06000045 RID: 69 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000045")]
[Address(RVA = "0x4089A0", Offset = "0x4077A0", VA = "0x1804089A0")]
private IncrementalHash(HashAlgorithmName name, HashAlgorithm hash)
{
}
/// <summary>Appends the specified data to the data already processed in the hash or HMAC.</summary>
/// <param name="data">The data to process.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Security.Cryptography.IncrementalHash" /> object has already been disposed.</exception>
// Token: 0x06000046 RID: 70 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000046")]
[Address(RVA = "0x6BAF50", Offset = "0x6B9D50", VA = "0x1806BAF50")]
public void AppendData(byte[] data)
{
}
/// <summary>Appends the specified number of bytes from the specified data, starting at the specified offset, to the data already processed in the hash or Hash-based Message Authentication Code (HMAC).</summary>
/// <param name="data">The data to process.</param>
/// <param name="offset">The offset into the byte array from which to begin using data.</param>
/// <param name="count">The number of bytes to use from <paramref name="data" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="count" /> or <paramref name="offset" /> is negative.-or-<paramref name="count" /> is larger than the lenght of <paramref name="data" />.</exception>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is larger than the data length.</exception>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Security.Cryptography.IncrementalHash" /> object has already been disposed.</exception>
// Token: 0x06000047 RID: 71 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000047")]
[Address(RVA = "0x6BAD30", Offset = "0x6B9B30", VA = "0x1806BAD30")]
public void AppendData(byte[] data, int offset, int count)
{
}
/// <summary>Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the
/// <see cref="M:System.Security.Cryptography.IncrementalHash.AppendData(System.Byte[])" /> method, and resets the object to its initial state.</summary>
/// <returns>The computed hash or HMAC.</returns>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Security.Cryptography.IncrementalHash" /> object has already been disposed.</exception>
// Token: 0x06000048 RID: 72 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000048")]
[Address(RVA = "0x6BB5E0", Offset = "0x6BA3E0", VA = "0x1806BB5E0")]
public byte[] GetHashAndReset()
{
return null;
}
/// <summary>Releases the resources used by the current instance of the <see cref="T:System.Security.Cryptography.IncrementalHash" /> class.</summary>
// Token: 0x06000049 RID: 73 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000049")]
[Address(RVA = "0x6BB1A0", Offset = "0x6B9FA0", VA = "0x1806BB1A0", Slot = "4")]
public void Dispose()
{
}
/// <summary>Creates an <see cref="T:System.Security.Cryptography.IncrementalHash" /> for the specified algorithm.</summary>
/// <param name="hashAlgorithm">The name of the hash algorithm to perform.</param>
/// <returns>An <see cref="T:System.Security.Cryptography.IncrementalHash" /> instance ready to compute the hash algorithm specified by <paramref name="hashAlgorithm" />.</returns>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="hashAlgorithm" />.<see cref="P:System.Security.Cryptography.HashAlgorithmName.Name" /> is <see langword="null" /> or an empty string.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
/// <paramref name="hashAlgorithm" /> is not a known hash algorithm.</exception>
// Token: 0x0600004A RID: 74 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600004A")]
[Address(RVA = "0x6BB0E0", Offset = "0x6B9EE0", VA = "0x1806BB0E0")]
public static IncrementalHash CreateHash(HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>Creates an <see cref="T:System.Security.Cryptography.IncrementalHash" /> for the Hash-based Message Authentication Code (HMAC)
/// algorithm using the specified hash algorithm and key.</summary>
/// <param name="hashAlgorithm">The name of the hash algorithm to perform within the HMAC.</param>
/// <param name="key"> The secret key for the HMAC. The key can be of any length, but a key longer than the output size
/// of the specified hash algorithm will be hashed to derive a correctly-sized key. Therefore,
/// the recommended size of the secret key is the output size of the specified hash algorithm.</param>
/// <returns>An instance of the <see cref="T:System.Security.Cryptography.IncrementalHash" /> class ready to compute the specified hash algorithm.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="hashAlgorithm" />.<see cref="P:System.Security.Cryptography.HashAlgorithmName.Name" /> is <see langword="null" /> or
/// an empty string.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
/// <paramref name="hashAlgorithm" /> is not a known hash algorithm.</exception>
// Token: 0x0600004B RID: 75 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600004B")]
[Address(RVA = "0x6BAFE0", Offset = "0x6B9DE0", VA = "0x1806BAFE0")]
public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, byte[] key)
{
return null;
}
// Token: 0x0600004C RID: 76 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600004C")]
[Address(RVA = "0x6BB390", Offset = "0x6BA190", VA = "0x1806BB390")]
private static HashAlgorithm GetHashAlgorithm(HashAlgorithmName hashAlgorithm)
{
return null;
}
// Token: 0x0600004D RID: 77 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600004D")]
[Address(RVA = "0x6BB1D0", Offset = "0x6B9FD0", VA = "0x1806BB1D0")]
private static HashAlgorithm GetHMAC(HashAlgorithmName hashAlgorithm, byte[] key)
{
return null;
}
// Token: 0x04000001 RID: 1
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4000001")]
private readonly HashAlgorithmName _algorithmName;
// Token: 0x04000002 RID: 2
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4000002")]
private HashAlgorithm _hash;
// Token: 0x04000003 RID: 3
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4000003")]
private bool _disposed;
// Token: 0x04000004 RID: 4
[FieldOffset(Offset = "0x21")]
[Token(Token = "0x4000004")]
private bool _resetPending;
}
}