Files
27Aug2021-Cpp2IL-Dump/System.Core/System/Security/Cryptography/IncrementalHash.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +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: 0x02000017 RID: 23
[Token(Token = "0x2000017")]
public sealed class IncrementalHash : IDisposable
{
// Token: 0x06000076 RID: 118 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000076")]
[Address(RVA = "0x417DD0", Offset = "0x416DD0", VA = "0x180417DD0")]
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: 0x06000077 RID: 119 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000077")]
[Address(RVA = "0x10D6FF0", Offset = "0x10D5FF0", VA = "0x1810D6FF0")]
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: 0x06000078 RID: 120 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000078")]
[Address(RVA = "0x10D6DD0", Offset = "0x10D5DD0", VA = "0x1810D6DD0")]
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: 0x06000079 RID: 121 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000079")]
[Address(RVA = "0x10D7680", Offset = "0x10D6680", VA = "0x1810D7680")]
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: 0x0600007A RID: 122 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x600007A")]
[Address(RVA = "0x10D7240", Offset = "0x10D6240", VA = "0x1810D7240", 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: 0x0600007B RID: 123 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600007B")]
[Address(RVA = "0x10D7180", Offset = "0x10D6180", VA = "0x1810D7180")]
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: 0x0600007C RID: 124 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600007C")]
[Address(RVA = "0x10D7080", Offset = "0x10D6080", VA = "0x1810D7080")]
public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, byte[] key)
{
return null;
}
// Token: 0x0600007D RID: 125 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600007D")]
[Address(RVA = "0x10D7430", Offset = "0x10D6430", VA = "0x1810D7430")]
private static HashAlgorithm GetHashAlgorithm(HashAlgorithmName hashAlgorithm)
{
return null;
}
// Token: 0x0600007E RID: 126 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600007E")]
[Address(RVA = "0x10D7270", Offset = "0x10D6270", VA = "0x1810D7270")]
private static HashAlgorithm GetHMAC(HashAlgorithmName hashAlgorithm, byte[] key)
{
return null;
}
// Token: 0x0400001E RID: 30
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400001E")]
private readonly HashAlgorithmName _algorithmName;
// Token: 0x0400001F RID: 31
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400001F")]
private HashAlgorithm _hash;
// Token: 0x04000020 RID: 32
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4000020")]
private bool _disposed;
// Token: 0x04000021 RID: 33
[FieldOffset(Offset = "0x21")]
[Token(Token = "0x4000021")]
private bool _resetPending;
}
}