Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/Security/Cryptography/DSA.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

269 lines
16 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract base class from which all implementations of the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) must inherit.</summary>
// Token: 0x02000402 RID: 1026
[Token(Token = "0x2000402")]
[ComVisible(true)]
public abstract class DSA : AsymmetricAlgorithm
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSA" /> class.</summary>
// Token: 0x06002397 RID: 9111 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002397")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
protected DSA()
{
}
/// <summary>Creates the default cryptographic object used to perform the asymmetric algorithm.</summary>
/// <returns>A cryptographic object used to perform the asymmetric algorithm.</returns>
// Token: 0x06002398 RID: 9112 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002398")]
[Address(RVA = "0xC08300", Offset = "0xC07300", VA = "0x180C08300")]
public new static DSA Create()
{
return null;
}
/// <summary>Creates the specified cryptographic object used to perform the asymmetric algorithm.</summary>
/// <param name="algName">The name of the specific implementation of <see cref="T:System.Security.Cryptography.DSA" /> to use.</param>
/// <returns>A cryptographic object used to perform the asymmetric algorithm.</returns>
// Token: 0x06002399 RID: 9113 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002399")]
[Address(RVA = "0xC08360", Offset = "0xC07360", VA = "0x180C08360")]
public new static DSA Create(string algName)
{
return null;
}
/// <summary>When overridden in a derived class, creates the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <param name="rgbHash">The data to be signed.</param>
/// <returns>The digital signature for the specified data.</returns>
// Token: 0x0600239A RID: 9114
[Token(Token = "0x600239A")]
[Address(Slot = "13")]
public abstract byte[] CreateSignature(byte[] rgbHash);
/// <summary>When overridden in a derived class, verifies the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <param name="rgbHash">The hash of the data signed with <paramref name="rgbSignature" />.</param>
/// <param name="rgbSignature">The signature to be verified for rgbData.</param>
/// <returns>
/// <see langword="true" /> if <paramref name="rgbSignature" /> matches the signature computed using the specified hash algorithm and key on <paramref name="rgbHash" />; otherwise, <see langword="false" />.</returns>
// Token: 0x0600239B RID: 9115
[Token(Token = "0x600239B")]
[Address(Slot = "14")]
public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);
/// <summary>When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm.</summary>
/// <param name="data">The data to be hashed.</param>
/// <param name="offset">The index of the first byte in <paramref name="data" /> that is to be hashed.</param>
/// <param name="count">The number of bytes to hash.</param>
/// <param name="hashAlgorithm">The algorithm to use to hash the data.</param>
/// <returns>The hashed data.</returns>
/// <exception cref="T:System.NotImplementedException">A derived class must override this method.</exception>
// Token: 0x0600239C RID: 9116 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600239C")]
[Address(RVA = "0xC08D80", Offset = "0xC07D80", VA = "0x180C08D80", Slot = "15")]
protected virtual byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm.</summary>
/// <param name="data">The binary stream to hash.</param>
/// <param name="hashAlgorithm">The algorithm to use to hash the data.</param>
/// <returns>The hashed data.</returns>
/// <exception cref="T:System.NotImplementedException">A derived class must override this method.</exception>
// Token: 0x0600239D RID: 9117 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600239D")]
[Address(RVA = "0xC08DC0", Offset = "0xC07DC0", VA = "0x180C08DC0", Slot = "16")]
protected virtual byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value.</summary>
/// <param name="data">The input data for which to compute the hash.</param>
/// <param name="hashAlgorithm">The hash algorithm to use to create the hash value.</param>
/// <returns>The DSA signature for the specified data.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> 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 <see cref="F:System.String.Empty" />.</exception>
// Token: 0x0600239E RID: 9118 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600239E")]
[Address(RVA = "0xC08E00", Offset = "0xC07E00", VA = "0x180C08E00")]
public byte[] SignData(byte[] data, HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>Computes the hash value of a portion of the specified byte array using the specified hash algorithm and signs the resulting hash value.</summary>
/// <param name="data">The input data for which to compute the hash.</param>
/// <param name="offset">The offset into the array at which to begin using data.</param>
/// <param name="count">The number of bytes in the array to use as data.</param>
/// <param name="hashAlgorithm">The hash algorithm to use to create the hash value.</param>
/// <returns>The DSA signature for the specified data.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> 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 <see cref="F:System.String.Empty" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is less than zero.
/// -or-
/// <paramref name="count" /> is less than zero.
/// -or-
/// <paramref name="offset" /> + <paramref name="count" /> - 1 results in an index that is beyond the upper bound of <paramref name="data" />.</exception>
// Token: 0x0600239F RID: 9119 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600239F")]
[Address(RVA = "0xC08EB0", Offset = "0xC07EB0", VA = "0x180C08EB0", Slot = "17")]
public virtual byte[] SignData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.</summary>
/// <param name="data">The input stream for which to compute the hash.</param>
/// <param name="hashAlgorithm">The hash algorithm to use to create the hash value.</param>
/// <returns>The DSA signature for the specified data.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> 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 <see cref="F:System.String.Empty" />.</exception>
// Token: 0x060023A0 RID: 9120 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023A0")]
[Address(RVA = "0xC09030", Offset = "0xC08030", VA = "0x180C09030", Slot = "18")]
public virtual byte[] SignData(Stream data, HashAlgorithmName hashAlgorithm)
{
return null;
}
/// <summary>Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and comparing it to the provided signature.</summary>
/// <param name="data">The signed data.</param>
/// <param name="signature">The signature data to be verified.</param>
/// <param name="hashAlgorithm">The hash algorithm used to create the hash value of the data.</param>
/// <returns>
/// <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> is <see langword="null" />.
/// -or-
/// <paramref name="signature" /> 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 <see cref="F:System.String.Empty" />.</exception>
// Token: 0x060023A1 RID: 9121 RVA: 0x00016D10 File Offset: 0x00014F10
[Token(Token = "0x60023A1")]
[Address(RVA = "0xC095F0", Offset = "0xC085F0", VA = "0x180C095F0")]
public bool VerifyData(byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm)
{
return default(bool);
}
/// <summary>Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and comparing it to the provided signature.</summary>
/// <param name="data">The signed data.</param>
/// <param name="offset">The starting index at which to compute the hash.</param>
/// <param name="count">The number of bytes to hash.</param>
/// <param name="signature">The signature data to be verified.</param>
/// <param name="hashAlgorithm">The hash algorithm used to create the hash value of the data.</param>
/// <returns>
/// <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> is <see langword="null" />.
/// -or-
/// <paramref name="signature" /> 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 <see cref="F:System.String.Empty" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is less than zero.
/// -or-
/// <paramref name="count" /> is less than zero.
/// -or-
/// <paramref name="offset" /> + <paramref name="count" /> - 1 results in an index that is beyond the upper bound of <paramref name="data" />.</exception>
// Token: 0x060023A2 RID: 9122 RVA: 0x00016D28 File Offset: 0x00014F28
[Token(Token = "0x60023A2")]
[Address(RVA = "0xC09430", Offset = "0xC08430", VA = "0x180C09430", Slot = "19")]
public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm)
{
return default(bool);
}
/// <summary>Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and comparing it to the provided signature.</summary>
/// <param name="data">The signed data.</param>
/// <param name="signature">The signature data to be verified.</param>
/// <param name="hashAlgorithm">The hash algorithm used to create the hash value of the data.</param>
/// <returns>
/// <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="data" /> is <see langword="null" />.
/// -or-
/// <paramref name="signature" /> 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 <see cref="F:System.String.Empty" />.</exception>
// Token: 0x060023A3 RID: 9123 RVA: 0x00016D40 File Offset: 0x00014F40
[Token(Token = "0x60023A3")]
[Address(RVA = "0xC096B0", Offset = "0xC086B0", VA = "0x180C096B0", Slot = "20")]
public virtual bool VerifyData(Stream data, byte[] signature, HashAlgorithmName hashAlgorithm)
{
return default(bool);
}
/// <summary>Reconstructs a <see cref="T:System.Security.Cryptography.DSA" /> object from an XML string.</summary>
/// <param name="xmlString">The XML string to use to reconstruct the <see cref="T:System.Security.Cryptography.DSA" /> object.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="xmlString" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The format of the <paramref name="xmlString" /> parameter is not valid.</exception>
// Token: 0x060023A4 RID: 9124 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023A4")]
[Address(RVA = "0xC08460", Offset = "0xC07460", VA = "0x180C08460", Slot = "11")]
public override void FromXmlString(string xmlString)
{
}
/// <summary>Creates and returns an XML string representation of the current <see cref="T:System.Security.Cryptography.DSA" /> object.</summary>
/// <param name="includePrivateParameters">
/// <see langword="true" /> to include private parameters; otherwise, <see langword="false" />.</param>
/// <returns>An XML string encoding of the current <see cref="T:System.Security.Cryptography.DSA" /> object.</returns>
// Token: 0x060023A5 RID: 9125 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023A5")]
[Address(RVA = "0xC09100", Offset = "0xC08100", VA = "0x180C09100", Slot = "12")]
public override string ToXmlString(bool includePrivateParameters)
{
return null;
}
/// <summary>When overridden in a derived class, exports the <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <param name="includePrivateParameters">
/// <see langword="true" /> to include private parameters; otherwise, <see langword="false" />.</param>
/// <returns>The parameters for <see cref="T:System.Security.Cryptography.DSA" />.</returns>
// Token: 0x060023A6 RID: 9126
[Token(Token = "0x60023A6")]
[Address(Slot = "21")]
public abstract DSAParameters ExportParameters(bool includePrivateParameters);
/// <summary>When overridden in a derived class, imports the specified <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <param name="parameters">The parameters for <see cref="T:System.Security.Cryptography.DSA" />.</param>
// Token: 0x060023A7 RID: 9127
[Token(Token = "0x60023A7")]
[Address(Slot = "22")]
public abstract void ImportParameters(DSAParameters parameters);
// Token: 0x060023A8 RID: 9128 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023A8")]
[Address(RVA = "0xC083F0", Offset = "0xC073F0", VA = "0x180C083F0")]
private static Exception DerivedClassMustOverride()
{
return null;
}
// Token: 0x060023A9 RID: 9129 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023A9")]
[Address(RVA = "0xC08D10", Offset = "0xC07D10", VA = "0x180C08D10")]
internal static Exception HashAlgorithmNameNullOrEmpty()
{
return null;
}
}
}