Files
2026-04-10 22:50:51 +02:00

338 lines
16 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace System.Security.Cryptography
{
/// <summary>Represents the base class from which all implementations of cryptographic hash algorithms must derive.</summary>
// Token: 0x020003E9 RID: 1001
[Token(Token = "0x20003E9")]
[ComVisible(true)]
public abstract class HashAlgorithm : IDisposable, ICryptoTransform
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HashAlgorithm" /> class.</summary>
// Token: 0x060021A8 RID: 8616 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60021A8")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected HashAlgorithm()
{
}
/// <summary>Gets the size, in bits, of the computed hash code.</summary>
/// <returns>The size, in bits, of the computed hash code.</returns>
// Token: 0x17000497 RID: 1175
// (get) Token: 0x060021A9 RID: 8617 RVA: 0x000149A0 File Offset: 0x00012BA0
[Token(Token = "0x17000497")]
public virtual int HashSize
{
[Token(Token = "0x60021A9")]
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "11")]
get
{
return 0;
}
}
/// <summary>Gets the value of the computed hash code.</summary>
/// <returns>The current value of the computed hash code.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">
/// <see cref="F:System.Security.Cryptography.HashAlgorithm.HashValue" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x17000498 RID: 1176
// (get) Token: 0x060021AA RID: 8618 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000498")]
public virtual byte[] Hash
{
[Token(Token = "0x60021AA")]
[Address(RVA = "0x2DAA760", Offset = "0x2DA9560", VA = "0x182DAA760", Slot = "12")]
get
{
return null;
}
}
/// <summary>Creates an instance of the default implementation of a hash algorithm.</summary>
/// <returns>A new <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> instance, unless the default settings have been changed using the .</returns>
// Token: 0x060021AB RID: 8619 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021AB")]
[Address(RVA = "0x2DAA160", Offset = "0x2DA8F60", VA = "0x182DAA160")]
public static HashAlgorithm Create()
{
return null;
}
/// <summary>Creates an instance of the specified implementation of a hash algorithm.</summary>
/// <param name="hashName">The hash algorithm implementation to use. The following table shows the valid values for the <paramref name="hashName" /> parameter and the algorithms they map to.
/// Parameter value
///
/// Implements
///
/// SHA
///
/// <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> SHA1
///
/// <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> System.Security.Cryptography.SHA1
///
/// <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> System.Security.Cryptography.HashAlgorithm
///
/// <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> MD5
///
/// <see cref="T:System.Security.Cryptography.MD5CryptoServiceProvider" /> System.Security.Cryptography.MD5
///
/// <see cref="T:System.Security.Cryptography.MD5CryptoServiceProvider" /> SHA256
///
/// <see cref="T:System.Security.Cryptography.SHA256Managed" /> SHA-256
///
/// <see cref="T:System.Security.Cryptography.SHA256Managed" /> System.Security.Cryptography.SHA256
///
/// <see cref="T:System.Security.Cryptography.SHA256Managed" /> SHA384
///
/// <see cref="T:System.Security.Cryptography.SHA384Managed" /> SHA-384
///
/// <see cref="T:System.Security.Cryptography.SHA384Managed" /> System.Security.Cryptography.SHA384
///
/// <see cref="T:System.Security.Cryptography.SHA384Managed" /> SHA512
///
/// <see cref="T:System.Security.Cryptography.SHA512Managed" /> SHA-512
///
/// <see cref="T:System.Security.Cryptography.SHA512Managed" /> System.Security.Cryptography.SHA512
///
/// <see cref="T:System.Security.Cryptography.SHA512Managed" /></param>
/// <returns>A new instance of the specified hash algorithm, or <see langword="null" /> if <paramref name="hashName" /> is not a valid hash algorithm.</returns>
// Token: 0x060021AC RID: 8620 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021AC")]
[Address(RVA = "0x2DAA1B0", Offset = "0x2DA8FB0", VA = "0x182DAA1B0")]
public static HashAlgorithm Create(string hashName)
{
return null;
}
/// <summary>Computes the hash value for the specified <see cref="T:System.IO.Stream" /> object.</summary>
/// <param name="inputStream">The input to compute the hash code for.</param>
/// <returns>The computed hash code.</returns>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x060021AD RID: 8621 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021AD")]
[Address(RVA = "0x2DA9DE0", Offset = "0x2DA8BE0", VA = "0x182DA9DE0")]
public byte[] ComputeHash(Stream inputStream)
{
return null;
}
/// <summary>Computes the hash value for the specified byte array.</summary>
/// <param name="buffer">The input to compute the hash code for.</param>
/// <returns>The computed hash code.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x060021AE RID: 8622 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021AE")]
[Address(RVA = "0x2DA9CA0", Offset = "0x2DA8AA0", VA = "0x182DA9CA0")]
public byte[] ComputeHash(byte[] buffer)
{
return null;
}
/// <summary>Computes the hash value for the specified region of the specified byte array.</summary>
/// <param name="buffer">The input to compute the hash code for.</param>
/// <param name="offset">The offset into the byte array from which to begin using data.</param>
/// <param name="count">The number of bytes in the array to use as data.</param>
/// <returns>The computed hash code.</returns>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="count" /> is an invalid value.
/// -or-
/// <paramref name="buffer" /> length is invalid.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is out of range. This parameter requires a non-negative number.</exception>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x060021AF RID: 8623 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021AF")]
[Address(RVA = "0x2DA9F40", Offset = "0x2DA8D40", VA = "0x182DA9F40")]
public byte[] ComputeHash(byte[] buffer, int offset, int count)
{
return null;
}
/// <summary>When overridden in a derived class, gets the input block size.</summary>
/// <returns>The input block size.</returns>
// Token: 0x17000499 RID: 1177
// (get) Token: 0x060021B0 RID: 8624 RVA: 0x000149B8 File Offset: 0x00012BB8
[Token(Token = "0x17000499")]
public virtual int InputBlockSize
{
[Token(Token = "0x60021B0")]
[Address(RVA = "0x4100E0", Offset = "0x40EEE0", VA = "0x1804100E0", Slot = "13")]
get
{
return 0;
}
}
/// <summary>When overridden in a derived class, gets the output block size.</summary>
/// <returns>The output block size.</returns>
// Token: 0x1700049A RID: 1178
// (get) Token: 0x060021B1 RID: 8625 RVA: 0x000149D0 File Offset: 0x00012BD0
[Token(Token = "0x1700049A")]
public virtual int OutputBlockSize
{
[Token(Token = "0x60021B1")]
[Address(RVA = "0x4100E0", Offset = "0x40EEE0", VA = "0x1804100E0", Slot = "14")]
get
{
return 0;
}
}
/// <summary>When overridden in a derived class, gets a value indicating whether multiple blocks can be transformed.</summary>
/// <returns>
/// <see langword="true" /> if multiple blocks can be transformed; otherwise, <see langword="false" />.</returns>
// Token: 0x1700049B RID: 1179
// (get) Token: 0x060021B2 RID: 8626 RVA: 0x000149E8 File Offset: 0x00012BE8
[Token(Token = "0x1700049B")]
public virtual bool CanTransformMultipleBlocks
{
[Token(Token = "0x60021B2")]
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "15")]
get
{
return default(bool);
}
}
/// <summary>Gets a value indicating whether the current transform can be reused.</summary>
/// <returns>Always <see langword="true" />.</returns>
// Token: 0x1700049C RID: 1180
// (get) Token: 0x060021B3 RID: 8627 RVA: 0x00014A00 File Offset: 0x00012C00
[Token(Token = "0x1700049C")]
public virtual bool CanReuseTransform
{
[Token(Token = "0x60021B3")]
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "16")]
get
{
return default(bool);
}
}
/// <summary>Computes the hash value for the specified region of the input byte array and copies the specified region of the input byte array to the specified region of the output byte array.</summary>
/// <param name="inputBuffer">The input to compute the hash code for.</param>
/// <param name="inputOffset">The offset into the input byte array from which to begin using data.</param>
/// <param name="inputCount">The number of bytes in the input byte array to use as data.</param>
/// <param name="outputBuffer">A copy of the part of the input array used to compute the hash code.</param>
/// <param name="outputOffset">The offset into the output byte array from which to begin writing data.</param>
/// <returns>The number of bytes written.</returns>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="inputCount" /> uses an invalid value.
/// -or-
/// <paramref name="inputBuffer" /> has an invalid length.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="inputBuffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="inputOffset" /> is out of range. This parameter requires a non-negative number.</exception>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x060021B4 RID: 8628 RVA: 0x00014A18 File Offset: 0x00012C18
[Token(Token = "0x60021B4")]
[Address(RVA = "0x2DAA2F0", Offset = "0x2DA90F0", VA = "0x182DAA2F0", Slot = "9")]
public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
{
return 0;
}
/// <summary>Computes the hash value for the specified region of the specified byte array.</summary>
/// <param name="inputBuffer">The input to compute the hash code for.</param>
/// <param name="inputOffset">The offset into the byte array from which to begin using data.</param>
/// <param name="inputCount">The number of bytes in the byte array to use as data.</param>
/// <returns>An array that is a copy of the part of the input that is hashed.</returns>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="inputCount" /> uses an invalid value.
/// -or-
/// <paramref name="inputBuffer" /> has an invalid offset length.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="inputBuffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="inputOffset" /> is out of range. This parameter requires a non-negative number.</exception>
/// <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
// Token: 0x060021B5 RID: 8629 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60021B5")]
[Address(RVA = "0x2DAA500", Offset = "0x2DA9300", VA = "0x182DAA500", Slot = "10")]
public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
{
return null;
}
/// <summary>Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.HashAlgorithm" /> class.</summary>
// Token: 0x060021B6 RID: 8630 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60021B6")]
[Address(RVA = "0x2DAA280", Offset = "0x2DA9080", VA = "0x182DAA280", Slot = "4")]
public void Dispose()
{
}
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.HashAlgorithm" /> class.</summary>
// Token: 0x060021B7 RID: 8631 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60021B7")]
[Address(RVA = "0x2DA9C60", Offset = "0x2DA8A60", VA = "0x182DA9C60")]
public void Clear()
{
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.HashAlgorithm" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
// Token: 0x060021B8 RID: 8632 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60021B8")]
[Address(RVA = "0x2DAA240", Offset = "0x2DA9040", VA = "0x182DAA240", Slot = "17")]
protected virtual void Dispose(bool disposing)
{
}
/// <summary>Initializes an implementation of the <see cref="T:System.Security.Cryptography.HashAlgorithm" /> class.</summary>
// Token: 0x060021B9 RID: 8633
[Token(Token = "0x60021B9")]
[Address(Slot = "18")]
public abstract void Initialize();
/// <summary>When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.</summary>
/// <param name="array">The input to compute the hash code for.</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 byte array to use as data.</param>
// Token: 0x060021BA RID: 8634
[Token(Token = "0x60021BA")]
[Address(Slot = "19")]
protected abstract void HashCore(byte[] array, int ibStart, int cbSize);
/// <summary>When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic stream object.</summary>
/// <returns>The computed hash code.</returns>
// Token: 0x060021BB RID: 8635
[Token(Token = "0x60021BB")]
[Address(Slot = "20")]
protected abstract byte[] HashFinal();
/// <summary>Represents the size, in bits, of the computed hash code.</summary>
// Token: 0x04001356 RID: 4950
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4001356")]
protected int HashSizeValue;
/// <summary>Represents the value of the computed hash code.</summary>
// Token: 0x04001357 RID: 4951
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4001357")]
protected internal byte[] HashValue;
/// <summary>Represents the state of the hash computation.</summary>
// Token: 0x04001358 RID: 4952
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4001358")]
protected int State;
// Token: 0x04001359 RID: 4953
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
[Token(Token = "0x4001359")]
private bool m_bDisposed;
}
}