scripts
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Mono.Security.Cryptography;
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
/// <summary>Accesses the managed version of the <see cref="T:System.Security.Cryptography.Rijndael" /> algorithm. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000527 RID: 1319
|
||||
[ComVisible(true)]
|
||||
public sealed class RijndaelManaged : Rijndael
|
||||
{
|
||||
/// <summary>Generates a random initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) to be used for the algorithm.</summary>
|
||||
// Token: 0x06003070 RID: 12400 RVA: 0x0009E520 File Offset: 0x0009C720
|
||||
public override void GenerateIV()
|
||||
{
|
||||
this.IVValue = KeyBuilder.IV(this.BlockSizeValue >> 3);
|
||||
}
|
||||
|
||||
/// <summary>Generates a random <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> to be used for the algorithm.</summary>
|
||||
// Token: 0x06003071 RID: 12401 RVA: 0x0009E538 File Offset: 0x0009C738
|
||||
public override void GenerateKey()
|
||||
{
|
||||
this.KeyValue = KeyBuilder.Key(this.KeySizeValue >> 3);
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric <see cref="T:System.Security.Cryptography.Rijndael" /> decryptor object with the specified <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
||||
/// <returns>A symmetric <see cref="T:System.Security.Cryptography.Rijndael" /> decryptor object.</returns>
|
||||
/// <param name="rgbKey">The secret key to be used for the symmetric algorithm. The key size must be 128, 192, or 256 bits.</param>
|
||||
/// <param name="rgbIV">The IV to be used for the symmetric algorithm. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbKey" /> parameter is null.-or-The <paramref name="rgbIV" /> parameter is null.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" /> parameter is not <see cref="F:System.Security.Cryptography.CipherMode.ECB" />, <see cref="F:System.Security.Cryptography.CipherMode.CBC" />, or <see cref="F:System.Security.Cryptography.CipherMode.CFB" />.</exception>
|
||||
// Token: 0x06003072 RID: 12402 RVA: 0x0009E550 File Offset: 0x0009C750
|
||||
public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
|
||||
{
|
||||
return new RijndaelManagedTransform(this, false, rgbKey, rgbIV);
|
||||
}
|
||||
|
||||
/// <summary>Creates a symmetric <see cref="T:System.Security.Cryptography.Rijndael" /> encryptor object with the specified <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" /> and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
|
||||
/// <returns>A symmetric <see cref="T:System.Security.Cryptography.Rijndael" /> encryptor object.</returns>
|
||||
/// <param name="rgbKey">The secret key to be used for the symmetric algorithm. The key size must be 128, 192, or 256 bits.</param>
|
||||
/// <param name="rgbIV">The IV to be used for the symmetric algorithm. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbKey" /> parameter is null.-or-The <paramref name="rgbIV" /> parameter is null.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" /> parameter is not <see cref="F:System.Security.Cryptography.CipherMode.ECB" />, <see cref="F:System.Security.Cryptography.CipherMode.CBC" />, or <see cref="F:System.Security.Cryptography.CipherMode.CFB" />.</exception>
|
||||
// Token: 0x06003073 RID: 12403 RVA: 0x0009E55C File Offset: 0x0009C75C
|
||||
public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
|
||||
{
|
||||
return new RijndaelManagedTransform(this, true, rgbKey, rgbIV);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user