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

426 lines
19 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the <see cref="T:System.Security.Cryptography.DSA" /> algorithm. This class cannot be inherited.</summary>
// Token: 0x02000423 RID: 1059
[Token(Token = "0x2000423")]
[ComVisible(true)]
public sealed class DSACryptoServiceProvider : DSA, ICspAsymmetricAlgorithm
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class.</summary>
// Token: 0x060023B6 RID: 9142 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023B6")]
[Address(RVA = "0x2DA5C90", Offset = "0x2DA4A90", VA = "0x182DA5C90")]
public DSACryptoServiceProvider()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified parameters for the cryptographic service provider (CSP).</summary>
/// <param name="parameters">The parameters for the CSP.</param>
// Token: 0x060023B7 RID: 9143 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023B7")]
[Address(RVA = "0x2DA5BB0", Offset = "0x2DA49B0", VA = "0x182DA5BB0")]
public DSACryptoServiceProvider(CspParameters parameters)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified key size.</summary>
/// <param name="dwKeySize">The size of the key for the asymmetric algorithm in bits.</param>
// Token: 0x060023B8 RID: 9144 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023B8")]
[Address(RVA = "0x2DA5B70", Offset = "0x2DA4970", VA = "0x182DA5B70")]
public DSACryptoServiceProvider(int dwKeySize)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified key size and parameters for the cryptographic service provider (CSP).</summary>
/// <param name="dwKeySize">The size of the key for the cryptographic algorithm in bits.</param>
/// <param name="parameters">The parameters for the CSP.</param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The CSP cannot be acquired.
/// -or-
/// The key cannot be created.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="dwKeySize" /> is out of range.</exception>
// Token: 0x060023B9 RID: 9145 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023B9")]
[Address(RVA = "0x2DA5A90", Offset = "0x2DA4890", VA = "0x182DA5A90")]
public DSACryptoServiceProvider(int dwKeySize, CspParameters parameters)
{
}
// Token: 0x060023BA RID: 9146 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023BA")]
[Address(RVA = "0x2DA4CD0", Offset = "0x2DA3AD0", VA = "0x182DA4CD0")]
private void Common(int dwKeySize, bool parameters)
{
}
// Token: 0x060023BB RID: 9147 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023BB")]
[Address(RVA = "0x2DA4ED0", Offset = "0x2DA3CD0", VA = "0x182DA4ED0")]
private void Common(CspParameters parameters)
{
}
// Token: 0x060023BC RID: 9148 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023BC")]
[Address(RVA = "0x2DA50E0", Offset = "0x2DA3EE0", VA = "0x182DA50E0", Slot = "1")]
protected override void Finalize()
{
}
/// <summary>Gets the name of the key exchange algorithm.</summary>
/// <returns>The name of the key exchange algorithm.</returns>
// Token: 0x170004F6 RID: 1270
// (get) Token: 0x060023BD RID: 9149 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170004F6")]
public override string KeyExchangeAlgorithm
{
[Token(Token = "0x60023BD")]
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "10")]
get
{
return null;
}
}
/// <summary>Gets the size of the key used by the asymmetric algorithm in bits.</summary>
/// <returns>The size of the key used by the asymmetric algorithm.</returns>
// Token: 0x170004F7 RID: 1271
// (get) Token: 0x060023BE RID: 9150 RVA: 0x00015468 File Offset: 0x00013668
[Token(Token = "0x170004F7")]
public override int KeySize
{
[Token(Token = "0x60023BE")]
[Address(RVA = "0x2DA5CC0", Offset = "0x2DA4AC0", VA = "0x182DA5CC0", Slot = "6")]
get
{
return 0;
}
}
/// <summary>Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP).</summary>
/// <returns>
/// <see langword="true" /> if the key should be persisted in the CSP; otherwise, <see langword="false" />.</returns>
// Token: 0x170004F8 RID: 1272
// (get) Token: 0x060023BF RID: 9151 RVA: 0x00015480 File Offset: 0x00013680
// (set) Token: 0x060023C0 RID: 9152 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x170004F8")]
public bool PersistKeyInCsp
{
[Token(Token = "0x60023BF")]
[Address(RVA = "0x494270", Offset = "0x493070", VA = "0x180494270")]
get
{
return default(bool);
}
[Token(Token = "0x60023C0")]
[Address(RVA = "0x494500", Offset = "0x493300", VA = "0x180494500")]
set
{
}
}
/// <summary>Gets a value that indicates whether the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object contains only a public key.</summary>
/// <returns>
/// <see langword="true" /> if the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object contains only a public key; otherwise, <see langword="false" />.</returns>
// Token: 0x170004F9 RID: 1273
// (get) Token: 0x060023C1 RID: 9153 RVA: 0x00015498 File Offset: 0x00013698
[Token(Token = "0x170004F9")]
[ComVisible(false)]
public bool PublicOnly
{
[Token(Token = "0x60023C1")]
[Address(RVA = "0x2DA5CF0", Offset = "0x2DA4AF0", VA = "0x182DA5CF0")]
get
{
return default(bool);
}
}
/// <summary>Gets the name of the signature algorithm.</summary>
/// <returns>The name of the signature algorithm.</returns>
// Token: 0x170004FA RID: 1274
// (get) Token: 0x060023C2 RID: 9154 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170004FA")]
public override string SignatureAlgorithm
{
[Token(Token = "0x60023C2")]
[Address(RVA = "0x2DA5D10", Offset = "0x2DA4B10", VA = "0x182DA5D10", Slot = "9")]
get
{
return null;
}
}
/// <summary>Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store.</summary>
/// <returns>
/// <see langword="true" /> if the key should be persisted in the computer key store; otherwise, <see langword="false" />.</returns>
// Token: 0x170004FB RID: 1275
// (get) Token: 0x060023C3 RID: 9155 RVA: 0x000154B0 File Offset: 0x000136B0
// (set) Token: 0x060023C4 RID: 9156 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x170004FB")]
public static bool UseMachineKeyStore
{
[Token(Token = "0x60023C3")]
[Address(RVA = "0x2DA5D40", Offset = "0x2DA4B40", VA = "0x182DA5D40")]
get
{
return default(bool);
}
[Token(Token = "0x60023C4")]
[Address(RVA = "0x2DA5D80", Offset = "0x2DA4B80", VA = "0x182DA5D80")]
set
{
}
}
/// <summary>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>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key cannot be exported.</exception>
// Token: 0x060023C5 RID: 9157 RVA: 0x000154C8 File Offset: 0x000136C8
[Token(Token = "0x60023C5")]
[Address(RVA = "0x2DA5000", Offset = "0x2DA3E00", VA = "0x182DA5000", Slot = "21")]
public override DSAParameters ExportParameters(bool includePrivateParameters)
{
return default(DSAParameters);
}
/// <summary>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>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.
/// -or-
/// The <paramref name="parameters" /> parameter has missing fields.</exception>
// Token: 0x060023C6 RID: 9158 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023C6")]
[Address(RVA = "0x2DA55E0", Offset = "0x2DA43E0", VA = "0x182DA55E0", Slot = "22")]
public override void ImportParameters(DSAParameters parameters)
{
}
/// <summary>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: 0x060023C7 RID: 9159 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023C7")]
[Address(RVA = "0x2435B10", Offset = "0x2434910", VA = "0x182435B10", Slot = "13")]
public override byte[] CreateSignature(byte[] rgbHash)
{
return null;
}
/// <summary>Computes the hash value of the specified byte array and signs the resulting hash value.</summary>
/// <param name="buffer">The input data for which to compute the hash.</param>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
// Token: 0x060023C8 RID: 9160 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023C8")]
[Address(RVA = "0x2DA5790", Offset = "0x2DA4590", VA = "0x182DA5790")]
public byte[] SignData(byte[] buffer)
{
return null;
}
/// <summary>Signs a byte array from the specified start point to the specified end point.</summary>
/// <param name="buffer">The input data to sign.</param>
/// <param name="offset">The offset into the 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 <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
// Token: 0x060023C9 RID: 9161 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023C9")]
[Address(RVA = "0x2DA5710", Offset = "0x2DA4510", VA = "0x182DA5710")]
public byte[] SignData(byte[] buffer, int offset, int count)
{
return null;
}
/// <summary>Computes the hash value of the specified input stream and signs the resulting hash value.</summary>
/// <param name="inputStream">The input data for which to compute the hash.</param>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
// Token: 0x060023CA RID: 9162 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023CA")]
[Address(RVA = "0x2DA56B0", Offset = "0x2DA44B0", VA = "0x182DA56B0")]
public byte[] SignData(Stream inputStream)
{
return null;
}
/// <summary>Computes the signature for the specified hash value by encrypting it with the private key.</summary>
/// <param name="rgbHash">The hash value of the data to be signed.</param>
/// <param name="str">The name of the hash algorithm used to create the hash value of the data.</param>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified hash value.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbHash" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.
/// -or-
/// There is no private key.</exception>
// Token: 0x060023CB RID: 9163 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023CB")]
[Address(RVA = "0x2DA57F0", Offset = "0x2DA45F0", VA = "0x182DA57F0")]
public byte[] SignHash(byte[] rgbHash, string str)
{
return null;
}
/// <summary>Verifies the specified signature data by comparing it to the signature computed for the specified data.</summary>
/// <param name="rgbData">The data that was signed.</param>
/// <param name="rgbSignature">The signature data to be verified.</param>
/// <returns>
/// <see langword="true" /> if the signature verifies as valid; otherwise, <see langword="false" />.</returns>
// Token: 0x060023CC RID: 9164 RVA: 0x000154E0 File Offset: 0x000136E0
[Token(Token = "0x60023CC")]
[Address(RVA = "0x2DA58E0", Offset = "0x2DA46E0", VA = "0x182DA58E0")]
public bool VerifyData(byte[] rgbData, byte[] rgbSignature)
{
return default(bool);
}
/// <summary>Verifies the specified signature data by comparing it to the signature computed for the specified hash value.</summary>
/// <param name="rgbHash">The hash value of the data to be signed.</param>
/// <param name="str">The name of the hash algorithm used to create the hash value of the data.</param>
/// <param name="rgbSignature">The signature data to be verified.</param>
/// <returns>
/// <see langword="true" /> if the signature verifies as valid; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbHash" /> parameter is <see langword="null" />.
/// -or-
/// The <paramref name="rgbSignature" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.
/// -or-
/// The signature cannot be verified.</exception>
// Token: 0x060023CD RID: 9165 RVA: 0x000154F8 File Offset: 0x000136F8
[Token(Token = "0x60023CD")]
[Address(RVA = "0x2DA5950", Offset = "0x2DA4750", VA = "0x182DA5950")]
public bool VerifyHash(byte[] rgbHash, string str, byte[] rgbSignature)
{
return default(bool);
}
/// <summary>Verifies the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <param name="rgbHash">The data signed with <paramref name="rgbSignature" />.</param>
/// <param name="rgbSignature">The signature to be verified for <paramref name="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: 0x060023CE RID: 9166 RVA: 0x00015510 File Offset: 0x00013710
[Token(Token = "0x60023CE")]
[Address(RVA = "0x2DA5A60", Offset = "0x2DA4860", VA = "0x182DA5A60", Slot = "14")]
public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
{
return default(bool);
}
// Token: 0x060023CF RID: 9167 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023CF")]
[Address(RVA = "0x2DA5160", Offset = "0x2DA3F60", VA = "0x182DA5160", Slot = "15")]
protected override byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
{
return null;
}
// Token: 0x060023D0 RID: 9168 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023D0")]
[Address(RVA = "0x2DA52A0", Offset = "0x2DA40A0", VA = "0x182DA52A0", Slot = "16")]
protected override byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm)
{
return null;
}
// Token: 0x060023D1 RID: 9169 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023D1")]
[Address(RVA = "0x2DA4F90", Offset = "0x2DA3D90", VA = "0x182DA4F90", Slot = "5")]
protected override void Dispose(bool disposing)
{
}
// Token: 0x060023D2 RID: 9170 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023D2")]
[Address(RVA = "0x2DA5630", Offset = "0x2DA4430", VA = "0x182DA5630")]
private void OnKeyGenerated(object sender, EventArgs e)
{
}
/// <summary>Gets a <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> object that describes additional information about a cryptographic key pair.</summary>
/// <returns>A <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> object that describes additional information about a cryptographic key pair.</returns>
// Token: 0x170004FC RID: 1276
// (get) Token: 0x060023D3 RID: 9171 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170004FC")]
[MonoTODO]
[MonoTODO("call into KeyPairPersistence to get details")]
[ComVisible(false)]
public CspKeyContainerInfo CspKeyContainerInfo
{
[Token(Token = "0x60023D3")]
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "25")]
get
{
return null;
}
}
/// <summary>Exports a blob containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object.</summary>
/// <param name="includePrivateParameters">
/// <see langword="true" /> to include the private key; otherwise, <see langword="false" />.</param>
/// <returns>A byte array containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object.</returns>
// Token: 0x060023D4 RID: 9172 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60023D4")]
[Address(RVA = "0x2DA4FE0", Offset = "0x2DA3DE0", VA = "0x182DA4FE0", Slot = "23")]
[ComVisible(false)]
public byte[] ExportCspBlob(bool includePrivateParameters)
{
return null;
}
/// <summary>Imports a blob that represents DSA key information.</summary>
/// <param name="keyBlob">A byte array that represents a DSA key blob.</param>
// Token: 0x060023D5 RID: 9173 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60023D5")]
[Address(RVA = "0x2DA53C0", Offset = "0x2DA41C0", VA = "0x182DA53C0", Slot = "24")]
[ComVisible(false)]
public void ImportCspBlob(byte[] keyBlob)
{
}
// Token: 0x04001442 RID: 5186
[Token(Token = "0x4001442")]
private const int PROV_DSS_DH = 13;
// Token: 0x04001443 RID: 5187
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4001443")]
private KeyPairPersistence store;
// Token: 0x04001444 RID: 5188
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4001444")]
private bool persistKey;
// Token: 0x04001445 RID: 5189
[global::Cpp2IlInjected.FieldOffset(Offset = "0x29")]
[Token(Token = "0x4001445")]
private bool persisted;
// Token: 0x04001446 RID: 5190
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2A")]
[Token(Token = "0x4001446")]
private bool privateKeyExportable;
// Token: 0x04001447 RID: 5191
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2B")]
[Token(Token = "0x4001447")]
private bool m_disposed;
// Token: 0x04001448 RID: 5192
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4001448")]
private DSAManaged dsa;
// Token: 0x04001449 RID: 5193
[Token(Token = "0x4001449")]
private static bool useMachineKeyStore;
}
}