629 lines
30 KiB
C#
629 lines
30 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using Mono.Security.Cryptography;
|
|
|
|
namespace System.Security.Cryptography
|
|
{
|
|
/// <summary>Performs asymmetric encryption and decryption using the implementation of the <see cref="T:System.Security.Cryptography.RSA" /> algorithm provided by the cryptographic service provider (CSP). This class cannot be inherited.</summary>
|
|
// Token: 0x02000421 RID: 1057
|
|
[Token(Token = "0x2000421")]
|
|
[ComVisible(true)]
|
|
public sealed class RSACryptoServiceProvider : RSA, ICspAsymmetricAlgorithm
|
|
{
|
|
/// <summary>Gets the name of the signature algorithm available with this implementation of <see cref="T:System.Security.Cryptography.RSA" />.</summary>
|
|
/// <returns>The name of the signature algorithm.</returns>
|
|
// Token: 0x17000538 RID: 1336
|
|
// (get) Token: 0x060024A1 RID: 9377 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000538")]
|
|
public override string SignatureAlgorithm
|
|
{
|
|
[Token(Token = "0x60024A1")]
|
|
[Address(RVA = "0x1023FF0", Offset = "0x1022FF0", VA = "0x181023FF0", 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: 0x17000539 RID: 1337
|
|
// (get) Token: 0x060024A2 RID: 9378 RVA: 0x000171D8 File Offset: 0x000153D8
|
|
// (set) Token: 0x060024A3 RID: 9379 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000539")]
|
|
public static bool UseMachineKeyStore
|
|
{
|
|
[Token(Token = "0x60024A2")]
|
|
[Address(RVA = "0x1024020", Offset = "0x1023020", VA = "0x181024020")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
[Token(Token = "0x60024A3")]
|
|
[Address(RVA = "0x1024110", Offset = "0x1023110", VA = "0x181024110")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x060024A4 RID: 9380 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024A4")]
|
|
[Address(RVA = "0x1022830", Offset = "0x1021830", VA = "0x181022830", Slot = "17")]
|
|
protected override byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024A5 RID: 9381 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024A5")]
|
|
[Address(RVA = "0x1022890", Offset = "0x1021890", VA = "0x181022890", Slot = "18")]
|
|
protected override byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024A6 RID: 9382 RVA: 0x000171F0 File Offset: 0x000153F0
|
|
[Token(Token = "0x60024A6")]
|
|
[Address(RVA = "0x1022210", Offset = "0x1021210", VA = "0x181022210")]
|
|
private static int GetAlgorithmId(HashAlgorithmName hashAlgorithm)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Encrypts data with the <see cref="T:System.Security.Cryptography.RSA" /> algorithm using the specified padding.</summary>
|
|
/// <param name="data">The data to encrypt.</param>
|
|
/// <param name="padding">The padding.</param>
|
|
/// <returns>The encrypted data.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="data" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="padding" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The padding mode is not supported.</exception>
|
|
// Token: 0x060024A7 RID: 9383 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024A7")]
|
|
[Address(RVA = "0x1021BC0", Offset = "0x1020BC0", VA = "0x181021BC0", Slot = "13")]
|
|
public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Decrypts data that was previously encrypted with the <see cref="T:System.Security.Cryptography.RSA" /> algorithm by using the specified padding.</summary>
|
|
/// <param name="data">The data to decrypt.</param>
|
|
/// <param name="padding">The padding.</param>
|
|
/// <returns>The decrypted data.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="data" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="padding" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The padding mode is not supported.</exception>
|
|
// Token: 0x060024A8 RID: 9384 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024A8")]
|
|
[Address(RVA = "0x10216B0", Offset = "0x10206B0", VA = "0x1810216B0", Slot = "14")]
|
|
public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Computes the signature for the specified hash value by encrypting it with the private key using the specified padding.</summary>
|
|
/// <param name="hash">The hash value of the data to be signed.</param>
|
|
/// <param name="hashAlgorithm">The hash algorithm name used to create the hash value of the data.</param>
|
|
/// <param name="padding">The padding.</param>
|
|
/// <returns>The <see cref="T:System.Security.Cryptography.RSA" /> signature for the specified hash value.</returns>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="hashAlgorithm" /> is <see langword="null" /> or <see cref="F:System.String.Empty" />.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="hash" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="padding" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
|
/// <paramref name="padding" /> does not equal <see cref="P:System.Security.Cryptography.RSASignaturePadding.Pkcs1" />.</exception>
|
|
// Token: 0x060024A9 RID: 9385 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024A9")]
|
|
[Address(RVA = "0x10233C0", Offset = "0x10223C0", VA = "0x1810233C0", Slot = "15")]
|
|
public override byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Verifies that a digital signature is valid by determining the hash value in the signature using the specified hashing algorithm and padding, and comparing it to the provided hash value.</summary>
|
|
/// <param name="hash">The hash value of the signed data.</param>
|
|
/// <param name="signature">The signature data to be verified.</param>
|
|
/// <param name="hashAlgorithm">The hash algorithm name used to create the hash value.</param>
|
|
/// <param name="padding">The padding.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the signature is valid; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="hashAlgorithm" /> is <see langword="null" /> or <see cref="F:System.String.Empty" />.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="hash" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="padding" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
|
/// <paramref name="padding" /> does not equal <see cref="P:System.Security.Cryptography.RSASignaturePadding.Pkcs1" />.</exception>
|
|
// Token: 0x060024AA RID: 9386 RVA: 0x00017208 File Offset: 0x00015408
|
|
[Token(Token = "0x60024AA")]
|
|
[Address(RVA = "0x10237F0", Offset = "0x10227F0", VA = "0x1810237F0", Slot = "16")]
|
|
public override bool VerifyHash(byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x060024AB RID: 9387 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024AB")]
|
|
[Address(RVA = "0x1023030", Offset = "0x1022030", VA = "0x181023030")]
|
|
private static Exception PaddingModeNotSupported()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> class using the default key.</summary>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.</exception>
|
|
// Token: 0x060024AC RID: 9388 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024AC")]
|
|
[Address(RVA = "0x1023D70", Offset = "0x1022D70", VA = "0x181023D70")]
|
|
public RSACryptoServiceProvider()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> class with the specified parameters.</summary>
|
|
/// <param name="parameters">The parameters to be passed to the cryptographic service provider (CSP).</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The CSP cannot be acquired.</exception>
|
|
// Token: 0x060024AD RID: 9389 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024AD")]
|
|
[Address(RVA = "0x1023C50", Offset = "0x1022C50", VA = "0x181023C50")]
|
|
public RSACryptoServiceProvider(CspParameters parameters)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> class with the specified key size.</summary>
|
|
/// <param name="dwKeySize">The size of the key to use in bits.</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.</exception>
|
|
// Token: 0x060024AE RID: 9390 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024AE")]
|
|
[Address(RVA = "0x1023EC0", Offset = "0x1022EC0", VA = "0x181023EC0")]
|
|
public RSACryptoServiceProvider(int dwKeySize)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> class with the specified key size and parameters.</summary>
|
|
/// <param name="dwKeySize">The size of the key to use in bits.</param>
|
|
/// <param name="parameters">The parameters to be passed to the cryptographic service provider (CSP).</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The CSP cannot be acquired.
|
|
/// -or-
|
|
/// The key cannot be created.</exception>
|
|
// Token: 0x060024AF RID: 9391 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024AF")]
|
|
[Address(RVA = "0x1023DA0", Offset = "0x1022DA0", VA = "0x181023DA0")]
|
|
public RSACryptoServiceProvider(int dwKeySize, CspParameters parameters)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060024B0 RID: 9392 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024B0")]
|
|
[Address(RVA = "0x1021300", Offset = "0x1020300", VA = "0x181021300")]
|
|
private void Common(int dwKeySize, bool parameters)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060024B1 RID: 9393 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024B1")]
|
|
[Address(RVA = "0x1021510", Offset = "0x1020510", VA = "0x181021510")]
|
|
private void Common(CspParameters p)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060024B2 RID: 9394 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024B2")]
|
|
[Address(RVA = "0x1022190", Offset = "0x1021190", VA = "0x181022190", Slot = "1")]
|
|
protected override void Finalize()
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets the name of the key exchange algorithm available with this implementation of <see cref="T:System.Security.Cryptography.RSA" />.</summary>
|
|
/// <returns>The name of the key exchange algorithm if it exists; otherwise, <see langword="null" />.</returns>
|
|
// Token: 0x1700053A RID: 1338
|
|
// (get) Token: 0x060024B3 RID: 9395 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x1700053A")]
|
|
public override string KeyExchangeAlgorithm
|
|
{
|
|
[Token(Token = "0x60024B3")]
|
|
[Address(RVA = "0x1023F70", Offset = "0x1022F70", VA = "0x181023F70", Slot = "10")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the size of the current key.</summary>
|
|
/// <returns>The size of the key in bits.</returns>
|
|
// Token: 0x1700053B RID: 1339
|
|
// (get) Token: 0x060024B4 RID: 9396 RVA: 0x00017220 File Offset: 0x00015420
|
|
[Token(Token = "0x1700053B")]
|
|
public override int KeySize
|
|
{
|
|
[Token(Token = "0x60024B4")]
|
|
[Address(RVA = "0x1023FA0", Offset = "0x1022FA0", VA = "0x181023FA0", 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: 0x1700053C RID: 1340
|
|
// (get) Token: 0x060024B5 RID: 9397 RVA: 0x00017238 File Offset: 0x00015438
|
|
// (set) Token: 0x060024B6 RID: 9398 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x1700053C")]
|
|
public bool PersistKeyInCsp
|
|
{
|
|
[Token(Token = "0x60024B5")]
|
|
[Address(RVA = "0x51F260", Offset = "0x51E260", VA = "0x18051F260")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
[Token(Token = "0x60024B6")]
|
|
[Address(RVA = "0x1024090", Offset = "0x1023090", VA = "0x181024090")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value that indicates whether the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> object contains only a public key.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> object contains only a public key; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x1700053D RID: 1341
|
|
// (get) Token: 0x060024B7 RID: 9399 RVA: 0x00017250 File Offset: 0x00015450
|
|
[Token(Token = "0x1700053D")]
|
|
[ComVisible(false)]
|
|
public bool PublicOnly
|
|
{
|
|
[Token(Token = "0x60024B7")]
|
|
[Address(RVA = "0x1023FD0", Offset = "0x1022FD0", VA = "0x181023FD0")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Decrypts data with the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</summary>
|
|
/// <param name="rgb">The data to be decrypted.</param>
|
|
/// <param name="fOAEP">
|
|
/// <see langword="true" /> to perform direct <see cref="T:System.Security.Cryptography.RSA" /> decryption using OAEP padding (only available on a computer running Microsoft Windows XP or later); otherwise, <see langword="false" /> to use PKCS#1 v1.5 padding.</param>
|
|
/// <returns>The decrypted data, which is the original plain text before encryption.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.
|
|
/// -or-
|
|
/// The <paramref name="fOAEP" /> parameter is <see langword="true" /> and the length of the <paramref name="rgb" /> parameter is greater than <see cref="P:System.Security.Cryptography.RSACryptoServiceProvider.KeySize" />.
|
|
/// -or-
|
|
/// The <paramref name="fOAEP" /> parameter is <see langword="true" /> and OAEP is not supported.
|
|
/// -or-
|
|
/// The key does not match the encrypted data. However, the exception wording may not be accurate. For example, it may say Not enough storage is available to process this command.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="rgb" /> is <see langword="null" />.</exception>
|
|
// Token: 0x060024B8 RID: 9400 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024B8")]
|
|
[Address(RVA = "0x1021860", Offset = "0x1020860", VA = "0x181021860")]
|
|
public byte[] Decrypt(byte[] rgb, bool fOAEP)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>This method is not supported in the current version.</summary>
|
|
/// <param name="rgb">The data to be decrypted.</param>
|
|
/// <returns>The decrypted data, which is the original plain text before encryption.</returns>
|
|
/// <exception cref="T:System.NotSupportedException">This method is not supported in the current version.</exception>
|
|
// Token: 0x060024B9 RID: 9401 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024B9")]
|
|
[Address(RVA = "0x1021610", Offset = "0x1020610", VA = "0x181021610", Slot = "22")]
|
|
public override byte[] DecryptValue(byte[] rgb)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Encrypts data with the <see cref="T:System.Security.Cryptography.RSA" /> algorithm.</summary>
|
|
/// <param name="rgb">The data to be encrypted.</param>
|
|
/// <param name="fOAEP">
|
|
/// <see langword="true" /> to perform direct <see cref="T:System.Security.Cryptography.RSA" /> encryption using OAEP padding (only available on a computer running Windows XP or later); otherwise, <see langword="false" /> to use PKCS#1 v1.5 padding.</param>
|
|
/// <returns>The encrypted data.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.
|
|
/// -or-
|
|
/// The length of the <paramref name="rgb" /> parameter is greater than the maximum allowed length.
|
|
/// -or-
|
|
/// The <paramref name="fOAEP" /> parameter is <see langword="true" /> and OAEP padding is not supported.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="rgb" /> is <see langword="null" />.</exception>
|
|
// Token: 0x060024BA RID: 9402 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024BA")]
|
|
[Address(RVA = "0x1021D70", Offset = "0x1020D70", VA = "0x181021D70")]
|
|
public byte[] Encrypt(byte[] rgb, bool fOAEP)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>This method is not supported in the current version.</summary>
|
|
/// <param name="rgb">The data to be encrypted.</param>
|
|
/// <returns>The encrypted data.</returns>
|
|
/// <exception cref="T:System.NotSupportedException">This method is not supported in the current version.</exception>
|
|
// Token: 0x060024BB RID: 9403 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024BB")]
|
|
[Address(RVA = "0x1021B90", Offset = "0x1020B90", VA = "0x181021B90", Slot = "23")]
|
|
public override byte[] EncryptValue(byte[] rgb)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Exports the <see cref="T:System.Security.Cryptography.RSAParameters" />.</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.RSA" />.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key cannot be exported.</exception>
|
|
// Token: 0x060024BC RID: 9404 RVA: 0x00017268 File Offset: 0x00015468
|
|
[Token(Token = "0x60024BC")]
|
|
[Address(RVA = "0x1021FE0", Offset = "0x1020FE0", VA = "0x181021FE0", Slot = "24")]
|
|
public override RSAParameters ExportParameters(bool includePrivateParameters)
|
|
{
|
|
return default(RSAParameters);
|
|
}
|
|
|
|
/// <summary>Imports the specified <see cref="T:System.Security.Cryptography.RSAParameters" />.</summary>
|
|
/// <param name="parameters">The parameters for <see cref="T:System.Security.Cryptography.RSA" />.</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: 0x060024BD RID: 9405 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024BD")]
|
|
[Address(RVA = "0x1022BB0", Offset = "0x1021BB0", VA = "0x181022BB0", Slot = "25")]
|
|
public override void ImportParameters(RSAParameters parameters)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060024BE RID: 9406 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024BE")]
|
|
[Address(RVA = "0x1022570", Offset = "0x1021570", VA = "0x181022570")]
|
|
private HashAlgorithm GetHash(object halg)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024BF RID: 9407 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024BF")]
|
|
[Address(RVA = "0x1022370", Offset = "0x1021370", VA = "0x181022370")]
|
|
private HashAlgorithm GetHashFromString(string name)
|
|
{
|
|
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="buffer">The input data for which to compute the hash.</param>
|
|
/// <param name="halg">The hash algorithm to use to create the hash value.</param>
|
|
/// <returns>The <see cref="T:System.Security.Cryptography.RSA" /> signature for the specified data.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="halg" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="halg" /> parameter is not a valid type.</exception>
|
|
// Token: 0x060024C0 RID: 9408 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C0")]
|
|
[Address(RVA = "0x1023140", Offset = "0x1022140", VA = "0x181023140")]
|
|
public byte[] SignData(byte[] buffer, object halg)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Computes the hash value of the specified input stream using the specified hash algorithm, and signs the resulting hash value.</summary>
|
|
/// <param name="inputStream">The input data for which to compute the hash.</param>
|
|
/// <param name="halg">The hash algorithm to use to create the hash value.</param>
|
|
/// <returns>The <see cref="T:System.Security.Cryptography.RSA" /> signature for the specified data.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="halg" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="halg" /> parameter is not a valid type.</exception>
|
|
// Token: 0x060024C1 RID: 9409 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C1")]
|
|
[Address(RVA = "0x10230A0", Offset = "0x10220A0", VA = "0x1810230A0")]
|
|
public byte[] SignData(Stream inputStream, object halg)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value.</summary>
|
|
/// <param name="buffer">The input data for which to compute the hash.</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>
|
|
/// <param name="halg">The hash algorithm to use to create the hash value.</param>
|
|
/// <returns>The <see cref="T:System.Security.Cryptography.RSA" /> signature for the specified data.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="halg" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="halg" /> parameter is not a valid type.</exception>
|
|
// Token: 0x060024C2 RID: 9410 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C2")]
|
|
[Address(RVA = "0x1023250", Offset = "0x1022250", VA = "0x181023250")]
|
|
public byte[] SignData(byte[] buffer, int offset, int count, object halg)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024C3 RID: 9411 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C3")]
|
|
[Address(RVA = "0x1022450", Offset = "0x1021450", VA = "0x181022450")]
|
|
private string GetHashNameFromOID(string oid)
|
|
{
|
|
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 hash algorithm identifier (OID) used to create the hash value of the data.</param>
|
|
/// <returns>The <see cref="T:System.Security.Cryptography.RSA" /> 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: 0x060024C4 RID: 9412 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C4")]
|
|
[Address(RVA = "0x10235F0", Offset = "0x10225F0", VA = "0x1810235F0")]
|
|
public byte[] SignHash(byte[] rgbHash, string str)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024C5 RID: 9413 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C5")]
|
|
[Address(RVA = "0x1023320", Offset = "0x1022320", VA = "0x181023320")]
|
|
private byte[] SignHash(byte[] rgbHash, int calgHash)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060024C6 RID: 9414 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024C6")]
|
|
[Address(RVA = "0x1022C00", Offset = "0x1021C00", VA = "0x181022C00")]
|
|
private static HashAlgorithm InternalHashToHashAlgorithm(int calgHash)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the hash value of the provided data.</summary>
|
|
/// <param name="buffer">The data that was signed.</param>
|
|
/// <param name="halg">The name of the hash algorithm used to create the hash value of the data.</param>
|
|
/// <param name="signature">The signature data to be verified.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the signature is valid; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="halg" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="halg" /> parameter is not a valid type.</exception>
|
|
// Token: 0x060024C7 RID: 9415 RVA: 0x00017280 File Offset: 0x00015480
|
|
[Token(Token = "0x60024C7")]
|
|
[Address(RVA = "0x10236C0", Offset = "0x10226C0", VA = "0x1810236C0")]
|
|
public bool VerifyData(byte[] buffer, object halg, byte[] signature)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the provided hash value.</summary>
|
|
/// <param name="rgbHash">The hash value of the signed data.</param>
|
|
/// <param name="str">The hash algorithm identifier (OID) 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 is 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: 0x060024C8 RID: 9416 RVA: 0x00017298 File Offset: 0x00015498
|
|
[Token(Token = "0x60024C8")]
|
|
[Address(RVA = "0x1023B30", Offset = "0x1022B30", VA = "0x181023B30")]
|
|
public bool VerifyHash(byte[] rgbHash, string str, byte[] rgbSignature)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x060024C9 RID: 9417 RVA: 0x000172B0 File Offset: 0x000154B0
|
|
[Token(Token = "0x60024C9")]
|
|
[Address(RVA = "0x1023A70", Offset = "0x1022A70", VA = "0x181023A70")]
|
|
private bool VerifyHash(byte[] rgbHash, int calgHash, byte[] rgbSignature)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x060024CA RID: 9418 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024CA")]
|
|
[Address(RVA = "0xC06C90", Offset = "0xC05C90", VA = "0x180C06C90", Slot = "5")]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060024CB RID: 9419 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024CB")]
|
|
[Address(RVA = "0x1022FB0", Offset = "0x1021FB0", VA = "0x181022FB0")]
|
|
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: 0x1700053E RID: 1342
|
|
// (get) Token: 0x060024CC RID: 9420 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x1700053E")]
|
|
[ComVisible(false)]
|
|
public CspKeyContainerInfo CspKeyContainerInfo
|
|
{
|
|
[Token(Token = "0x60024CC")]
|
|
[Address(RVA = "0x1023F00", Offset = "0x1022F00", VA = "0x181023F00", Slot = "28")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Exports a blob containing the key information associated with an <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> 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 an <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> object.</returns>
|
|
// Token: 0x060024CD RID: 9421 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60024CD")]
|
|
[Address(RVA = "0x1021F60", Offset = "0x1020F60", VA = "0x181021F60", Slot = "26")]
|
|
[ComVisible(false)]
|
|
public byte[] ExportCspBlob(bool includePrivateParameters)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Imports a blob that represents RSA key information.</summary>
|
|
/// <param name="keyBlob">A byte array that represents an RSA key blob.</param>
|
|
// Token: 0x060024CE RID: 9422 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60024CE")]
|
|
[Address(RVA = "0x10228D0", Offset = "0x10218D0", VA = "0x1810228D0", Slot = "27")]
|
|
[ComVisible(false)]
|
|
public void ImportCspBlob(byte[] keyBlob)
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001472 RID: 5234
|
|
[Token(Token = "0x4001472")]
|
|
private static CspProviderFlags s_UseMachineKeyStore;
|
|
|
|
// Token: 0x04001473 RID: 5235
|
|
[Token(Token = "0x4001473")]
|
|
private const int PROV_RSA_FULL = 1;
|
|
|
|
// Token: 0x04001474 RID: 5236
|
|
[Token(Token = "0x4001474")]
|
|
private const int AT_KEYEXCHANGE = 1;
|
|
|
|
// Token: 0x04001475 RID: 5237
|
|
[Token(Token = "0x4001475")]
|
|
private const int AT_SIGNATURE = 2;
|
|
|
|
// Token: 0x04001476 RID: 5238
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4001476")]
|
|
private KeyPairPersistence store;
|
|
|
|
// Token: 0x04001477 RID: 5239
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4001477")]
|
|
private bool persistKey;
|
|
|
|
// Token: 0x04001478 RID: 5240
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x29")]
|
|
[Token(Token = "0x4001478")]
|
|
private bool persisted;
|
|
|
|
// Token: 0x04001479 RID: 5241
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2A")]
|
|
[Token(Token = "0x4001479")]
|
|
private bool privateKeyExportable;
|
|
|
|
// Token: 0x0400147A RID: 5242
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2B")]
|
|
[Token(Token = "0x400147A")]
|
|
private bool m_disposed;
|
|
|
|
// Token: 0x0400147B RID: 5243
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400147B")]
|
|
private RSAManaged rsa;
|
|
}
|
|
}
|