scripts
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using Mono.Security.Cryptography;
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
/// <summary>Provides a managed implementation of the Advanced Encryption Standard (AES) symmetric algorithm. </summary>
|
||||
// Token: 0x0200004F RID: 79
|
||||
public sealed class AesManaged : Aes
|
||||
{
|
||||
/// <summary>Generates a random initialization vector (IV) to use for the symmetric algorithm.</summary>
|
||||
// Token: 0x0600045C RID: 1116 RVA: 0x000147A8 File Offset: 0x000129A8
|
||||
public override void GenerateIV()
|
||||
{
|
||||
this.IVValue = KeyBuilder.IV(this.BlockSizeValue >> 3);
|
||||
}
|
||||
|
||||
/// <summary>Generates a random key to use for the symmetric algorithm. </summary>
|
||||
// Token: 0x0600045D RID: 1117 RVA: 0x000147C0 File Offset: 0x000129C0
|
||||
public override void GenerateKey()
|
||||
{
|
||||
this.KeyValue = KeyBuilder.Key(this.KeySizeValue >> 3);
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric decryptor object using the specified key and initialization vector (IV).</summary>
|
||||
/// <returns>A symmetric decryptor object.</returns>
|
||||
/// <param name="key">The secret key to use for the symmetric algorithm.</param>
|
||||
/// <param name="iv">The initialization vector to use for the symmetric algorithm.</param>
|
||||
// Token: 0x0600045E RID: 1118 RVA: 0x000147D8 File Offset: 0x000129D8
|
||||
public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
|
||||
{
|
||||
return new AesTransform(this, false, rgbKey, rgbIV);
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric encryptor object using the specified key and initialization vector (IV).</summary>
|
||||
/// <returns>A symmetric encryptor object.</returns>
|
||||
/// <param name="key">The secret key to use for the symmetric algorithm.</param>
|
||||
/// <param name="iv">The initialization vector to use for the symmetric algorithm.</param>
|
||||
// Token: 0x0600045F RID: 1119 RVA: 0x000147E4 File Offset: 0x000129E4
|
||||
public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
|
||||
{
|
||||
return new AesTransform(this, true, rgbKey, rgbIV);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the initialization vector (IV) to use for the symmetric algorithm. </summary>
|
||||
/// <returns>The initialization vector to use for the symmetric algorithm</returns>
|
||||
// Token: 0x17000048 RID: 72
|
||||
// (get) Token: 0x06000460 RID: 1120 RVA: 0x000147F0 File Offset: 0x000129F0
|
||||
// (set) Token: 0x06000461 RID: 1121 RVA: 0x000147F8 File Offset: 0x000129F8
|
||||
public override byte[] IV
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.IV;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.IV = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the secret key used for the symmetric algorithm.</summary>
|
||||
/// <returns>The key for the symmetric algorithm.</returns>
|
||||
// Token: 0x17000049 RID: 73
|
||||
// (get) Token: 0x06000462 RID: 1122 RVA: 0x00014804 File Offset: 0x00012A04
|
||||
// (set) Token: 0x06000463 RID: 1123 RVA: 0x0001480C File Offset: 0x00012A0C
|
||||
public override byte[] Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Key;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Key = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the size, in bits, of the secret key used for the symmetric algorithm. </summary>
|
||||
/// <returns>The size, in bits, of the key used by the symmetric algorithm.</returns>
|
||||
// Token: 0x1700004A RID: 74
|
||||
// (get) Token: 0x06000464 RID: 1124 RVA: 0x00014818 File Offset: 0x00012A18
|
||||
// (set) Token: 0x06000465 RID: 1125 RVA: 0x00014820 File Offset: 0x00012A20
|
||||
public override int KeySize
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.KeySize;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.KeySize = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric decryptor object using the current key and initialization vector (IV).</summary>
|
||||
/// <returns>A symmetric decryptor object.</returns>
|
||||
// Token: 0x06000466 RID: 1126 RVA: 0x0001482C File Offset: 0x00012A2C
|
||||
public override ICryptoTransform CreateDecryptor()
|
||||
{
|
||||
return this.CreateDecryptor(this.Key, this.IV);
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric encryptor object using the current key and initialization vector (IV).</summary>
|
||||
/// <returns>A symmetric encryptor object.</returns>
|
||||
// Token: 0x06000467 RID: 1127 RVA: 0x00014840 File Offset: 0x00012A40
|
||||
public override ICryptoTransform CreateEncryptor()
|
||||
{
|
||||
return this.CreateEncryptor(this.Key, this.IV);
|
||||
}
|
||||
|
||||
// Token: 0x06000468 RID: 1128 RVA: 0x00014854 File Offset: 0x00012A54
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user