372 lines
17 KiB
C#
372 lines
17 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Security.Cryptography
|
|
{
|
|
/// <summary>Represents the abstract base class from which all implementations of symmetric algorithms must inherit.</summary>
|
|
// Token: 0x02000435 RID: 1077
|
|
[Token(Token = "0x2000435")]
|
|
[ComVisible(true)]
|
|
public abstract class SymmetricAlgorithm : IDisposable
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> class.</summary>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The implementation of the class derived from the symmetric algorithm is not valid.</exception>
|
|
// Token: 0x06002551 RID: 9553 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002551")]
|
|
[Address(RVA = "0xD17F30", Offset = "0xD16F30", VA = "0x180D17F30")]
|
|
protected SymmetricAlgorithm()
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> class.</summary>
|
|
// Token: 0x06002552 RID: 9554 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002552")]
|
|
[Address(RVA = "0xD17DE0", Offset = "0xD16DE0", VA = "0x180D17DE0", Slot = "4")]
|
|
public void Dispose()
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> class.</summary>
|
|
// Token: 0x06002553 RID: 9555 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002553")]
|
|
[Address(RVA = "0xD17BB0", Offset = "0xD16BB0", VA = "0x180D17BB0")]
|
|
public void Clear()
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> 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: 0x06002554 RID: 9556 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002554")]
|
|
[Address(RVA = "0xD17D90", Offset = "0xD16D90", VA = "0x180D17D90", Slot = "5")]
|
|
protected virtual void Dispose(bool disposing)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets or sets the block size, in bits, of the cryptographic operation.</summary>
|
|
/// <returns>The block size, in bits.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The block size is invalid.</exception>
|
|
// Token: 0x1700054F RID: 1359
|
|
// (get) Token: 0x06002555 RID: 9557 RVA: 0x00017520 File Offset: 0x00015720
|
|
// (set) Token: 0x06002556 RID: 9558 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x1700054F")]
|
|
public virtual int BlockSize
|
|
{
|
|
[Token(Token = "0x6002555")]
|
|
[Address(RVA = "0x40F000", Offset = "0x40E000", VA = "0x18040F000", Slot = "6")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
[Token(Token = "0x6002556")]
|
|
[Address(RVA = "0xD181A0", Offset = "0xD171A0", VA = "0x180D181A0", Slot = "7")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the feedback size, in bits, of the cryptographic operation.</summary>
|
|
/// <returns>The feedback size in bits.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The feedback size is larger than the block size.</exception>
|
|
// Token: 0x17000550 RID: 1360
|
|
// (get) Token: 0x06002557 RID: 9559 RVA: 0x00017538 File Offset: 0x00015738
|
|
// (set) Token: 0x06002558 RID: 9560 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000550")]
|
|
public virtual int FeedbackSize
|
|
{
|
|
[Token(Token = "0x6002557")]
|
|
[Address(RVA = "0x4936D0", Offset = "0x4926D0", VA = "0x1804936D0", Slot = "8")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
[Token(Token = "0x6002558")]
|
|
[Address(RVA = "0xD182D0", Offset = "0xD172D0", VA = "0x180D182D0", Slot = "9")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) for the symmetric algorithm.</summary>
|
|
/// <returns>The initialization vector.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">An attempt was made to set the initialization vector to <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An attempt was made to set the initialization vector to an invalid size.</exception>
|
|
// Token: 0x17000551 RID: 1361
|
|
// (get) Token: 0x06002559 RID: 9561 RVA: 0x00002082 File Offset: 0x00000282
|
|
// (set) Token: 0x0600255A RID: 9562 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000551")]
|
|
public virtual byte[] IV
|
|
{
|
|
[Token(Token = "0x6002559")]
|
|
[Address(RVA = "0xD17F60", Offset = "0xD16F60", VA = "0x180D17F60", Slot = "10")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
[Token(Token = "0x600255A")]
|
|
[Address(RVA = "0xD18370", Offset = "0xD17370", VA = "0x180D18370", Slot = "11")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the secret key for the symmetric algorithm.</summary>
|
|
/// <returns>The secret key to use for the symmetric algorithm.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">An attempt was made to set the key to <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key size is invalid.</exception>
|
|
// Token: 0x17000552 RID: 1362
|
|
// (get) Token: 0x0600255B RID: 9563 RVA: 0x00002082 File Offset: 0x00000282
|
|
// (set) Token: 0x0600255C RID: 9564 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000552")]
|
|
public virtual byte[] Key
|
|
{
|
|
[Token(Token = "0x600255B")]
|
|
[Address(RVA = "0xD18000", Offset = "0xD17000", VA = "0x180D18000", Slot = "12")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
[Token(Token = "0x600255C")]
|
|
[Address(RVA = "0xD18500", Offset = "0xD17500", VA = "0x180D18500", Slot = "13")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the block sizes, in bits, that are supported by the symmetric algorithm.</summary>
|
|
/// <returns>An array that contains the block sizes supported by the algorithm.</returns>
|
|
// Token: 0x17000553 RID: 1363
|
|
// (get) Token: 0x0600255D RID: 9565 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000553")]
|
|
public virtual KeySizes[] LegalBlockSizes
|
|
{
|
|
[Token(Token = "0x600255D")]
|
|
[Address(RVA = "0xD180A0", Offset = "0xD170A0", VA = "0x180D180A0", Slot = "14")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the key sizes, in bits, that are supported by the symmetric algorithm.</summary>
|
|
/// <returns>An array that contains the key sizes supported by the algorithm.</returns>
|
|
// Token: 0x17000554 RID: 1364
|
|
// (get) Token: 0x0600255E RID: 9566 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000554")]
|
|
public virtual KeySizes[] LegalKeySizes
|
|
{
|
|
[Token(Token = "0x600255E")]
|
|
[Address(RVA = "0xD18120", Offset = "0xD17120", VA = "0x180D18120", Slot = "15")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the size, in bits, of the secret key used by the symmetric algorithm.</summary>
|
|
/// <returns>The size, in bits, of the secret key used by the symmetric algorithm.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key size is not valid.</exception>
|
|
// Token: 0x17000555 RID: 1365
|
|
// (get) Token: 0x0600255F RID: 9567 RVA: 0x00017550 File Offset: 0x00015750
|
|
// (set) Token: 0x06002560 RID: 9568 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000555")]
|
|
public virtual int KeySize
|
|
{
|
|
[Token(Token = "0x600255F")]
|
|
[Address(RVA = "0x42B830", Offset = "0x42A830", VA = "0x18042B830", Slot = "16")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
[Token(Token = "0x6002560")]
|
|
[Address(RVA = "0xD18470", Offset = "0xD17470", VA = "0x180D18470", Slot = "17")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the mode for operation of the symmetric algorithm.</summary>
|
|
/// <returns>The mode for operation of the symmetric algorithm. The default is <see cref="F:System.Security.Cryptography.CipherMode.CBC" />.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cipher mode is not one of the <see cref="T:System.Security.Cryptography.CipherMode" /> values.</exception>
|
|
// Token: 0x17000556 RID: 1366
|
|
// (get) Token: 0x06002561 RID: 9569 RVA: 0x00017568 File Offset: 0x00015768
|
|
// (set) Token: 0x06002562 RID: 9570 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000556")]
|
|
public virtual CipherMode Mode
|
|
{
|
|
[Token(Token = "0x6002561")]
|
|
[Address(RVA = "0x696860", Offset = "0x695860", VA = "0x180696860", Slot = "18")]
|
|
get
|
|
{
|
|
return (CipherMode)0;
|
|
}
|
|
[Token(Token = "0x6002562")]
|
|
[Address(RVA = "0xD18620", Offset = "0xD17620", VA = "0x180D18620", Slot = "19")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the padding mode used in the symmetric algorithm.</summary>
|
|
/// <returns>The padding mode used in the symmetric algorithm. The default is <see cref="F:System.Security.Cryptography.PaddingMode.PKCS7" />.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The padding mode is not one of the <see cref="T:System.Security.Cryptography.PaddingMode" /> values.</exception>
|
|
// Token: 0x17000557 RID: 1367
|
|
// (get) Token: 0x06002563 RID: 9571 RVA: 0x00017580 File Offset: 0x00015780
|
|
// (set) Token: 0x06002564 RID: 9572 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000557")]
|
|
public virtual PaddingMode Padding
|
|
{
|
|
[Token(Token = "0x6002563")]
|
|
[Address(RVA = "0x678D20", Offset = "0x677D20", VA = "0x180678D20", Slot = "20")]
|
|
get
|
|
{
|
|
return (PaddingMode)0;
|
|
}
|
|
[Token(Token = "0x6002564")]
|
|
[Address(RVA = "0xD186A0", Offset = "0xD176A0", VA = "0x180D186A0", Slot = "21")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Determines whether the specified key size is valid for the current algorithm.</summary>
|
|
/// <param name="bitLength">The length, in bits, to check for a valid key size.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the specified key size is valid for the current algorithm; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06002565 RID: 9573 RVA: 0x00017598 File Offset: 0x00015798
|
|
[Token(Token = "0x6002565")]
|
|
[Address(RVA = "0xD17E50", Offset = "0xD16E50", VA = "0x180D17E50")]
|
|
public bool ValidKeySize(int bitLength)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Creates a default cryptographic object used to perform the symmetric algorithm.</summary>
|
|
/// <returns>A default cryptographic object used to perform the symmetric algorithm.</returns>
|
|
// Token: 0x06002566 RID: 9574 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002566")]
|
|
[Address(RVA = "0xD17D40", Offset = "0xD16D40", VA = "0x180D17D40")]
|
|
public static SymmetricAlgorithm Create()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates the specified cryptographic object used to perform the symmetric algorithm.</summary>
|
|
/// <param name="algName">The name of the specific implementation of the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> class to use.</param>
|
|
/// <returns>A cryptographic object used to perform the symmetric algorithm.</returns>
|
|
// Token: 0x06002567 RID: 9575 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002567")]
|
|
[Address(RVA = "0xD17CB0", Offset = "0xD16CB0", VA = "0x180D17CB0")]
|
|
public static SymmetricAlgorithm Create(string algName)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates a symmetric encryptor object with the current <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> property and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
|
/// <returns>A symmetric encryptor object.</returns>
|
|
// Token: 0x06002568 RID: 9576 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002568")]
|
|
[Address(RVA = "0xD17C50", Offset = "0xD16C50", VA = "0x180D17C50", Slot = "22")]
|
|
public virtual ICryptoTransform CreateEncryptor()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>When overridden in a derived class, creates a symmetric encryptor object with the specified <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> property and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
|
/// <param name="rgbKey">The secret key to use for the symmetric algorithm.</param>
|
|
/// <param name="rgbIV">The initialization vector to use for the symmetric algorithm.</param>
|
|
/// <returns>A symmetric encryptor object.</returns>
|
|
// Token: 0x06002569 RID: 9577
|
|
[Token(Token = "0x6002569")]
|
|
[Address(Slot = "23")]
|
|
public abstract ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV);
|
|
|
|
/// <summary>Creates a symmetric decryptor object with the current <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> property and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
|
/// <returns>A symmetric decryptor object.</returns>
|
|
// Token: 0x0600256A RID: 9578 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600256A")]
|
|
[Address(RVA = "0xD17BF0", Offset = "0xD16BF0", VA = "0x180D17BF0", Slot = "24")]
|
|
public virtual ICryptoTransform CreateDecryptor()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>When overridden in a derived class, creates a symmetric decryptor object with the specified <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> property and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
|
/// <param name="rgbKey">The secret key to use for the symmetric algorithm.</param>
|
|
/// <param name="rgbIV">The initialization vector to use for the symmetric algorithm.</param>
|
|
/// <returns>A symmetric decryptor object.</returns>
|
|
// Token: 0x0600256B RID: 9579
|
|
[Token(Token = "0x600256B")]
|
|
[Address(Slot = "25")]
|
|
public abstract ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV);
|
|
|
|
/// <summary>When overridden in a derived class, generates a random key (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" />) to use for the algorithm.</summary>
|
|
// Token: 0x0600256C RID: 9580
|
|
[Token(Token = "0x600256C")]
|
|
[Address(Slot = "26")]
|
|
public abstract void GenerateKey();
|
|
|
|
/// <summary>When overridden in a derived class, generates a random initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) to use for the algorithm.</summary>
|
|
// Token: 0x0600256D RID: 9581
|
|
[Token(Token = "0x600256D")]
|
|
[Address(Slot = "27")]
|
|
public abstract void GenerateIV();
|
|
|
|
/// <summary>Represents the block size, in bits, of the cryptographic operation.</summary>
|
|
// Token: 0x040014A0 RID: 5280
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40014A0")]
|
|
protected int BlockSizeValue;
|
|
|
|
/// <summary>Represents the feedback size, in bits, of the cryptographic operation.</summary>
|
|
// Token: 0x040014A1 RID: 5281
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x40014A1")]
|
|
protected int FeedbackSizeValue;
|
|
|
|
/// <summary>Represents the initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) for the symmetric algorithm.</summary>
|
|
// Token: 0x040014A2 RID: 5282
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40014A2")]
|
|
protected byte[] IVValue;
|
|
|
|
/// <summary>Represents the secret key for the symmetric algorithm.</summary>
|
|
// Token: 0x040014A3 RID: 5283
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40014A3")]
|
|
protected byte[] KeyValue;
|
|
|
|
/// <summary>Specifies the block sizes, in bits, that are supported by the symmetric algorithm.</summary>
|
|
// Token: 0x040014A4 RID: 5284
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40014A4")]
|
|
protected KeySizes[] LegalBlockSizesValue;
|
|
|
|
/// <summary>Specifies the key sizes, in bits, that are supported by the symmetric algorithm.</summary>
|
|
// Token: 0x040014A5 RID: 5285
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40014A5")]
|
|
protected KeySizes[] LegalKeySizesValue;
|
|
|
|
/// <summary>Represents the size, in bits, of the secret key used by the symmetric algorithm.</summary>
|
|
// Token: 0x040014A6 RID: 5286
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40014A6")]
|
|
protected int KeySizeValue;
|
|
|
|
/// <summary>Represents the cipher mode used in the symmetric algorithm.</summary>
|
|
// Token: 0x040014A7 RID: 5287
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x40014A7")]
|
|
protected CipherMode ModeValue;
|
|
|
|
/// <summary>Represents the padding mode used in the symmetric algorithm.</summary>
|
|
// Token: 0x040014A8 RID: 5288
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40014A8")]
|
|
protected PaddingMode PaddingValue;
|
|
}
|
|
}
|