using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// Defines a wrapper object to access the cryptographic service provider (CSP) version of the Data Encryption Standard () algorithm. This class cannot be inherited.
// Token: 0x020004F8 RID: 1272
[ComVisible(true)]
public sealed class DESCryptoServiceProvider : DES
{
/// Creates a symmetric Data Encryption Standard () decryptor object with the specified key () and initialization vector ().
/// A symmetric decryptor object.
/// The secret key to use for the symmetric algorithm.
/// The initialization vector to use for the symmetric algorithm.
/// The value of the property is .-or-The value of the property is , and the value of the property is not 8.-or-An invalid key size was used.-or-The algorithm key size was not available.
///
///
///
// Token: 0x06002F06 RID: 12038 RVA: 0x000977E0 File Offset: 0x000959E0
public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
{
return new DESTransform(this, false, rgbKey, rgbIV);
}
/// Creates a symmetric Data Encryption Standard () encryptor object with the specified key () and initialization vector ().
/// A symmetric encryptor object.
/// The secret key to use for the symmetric algorithm.
/// The initialization vector to use for the symmetric algorithm.
/// The value of the property is .-or-The value of the property is and the value of the property is not 8.-or-An invalid key size was used.-or-The algorithm key size was not available.
///
///
///
// Token: 0x06002F07 RID: 12039 RVA: 0x000977EC File Offset: 0x000959EC
public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
{
return new DESTransform(this, true, rgbKey, rgbIV);
}
/// Generates a random initialization vector () to use for the algorithm.
// Token: 0x06002F08 RID: 12040 RVA: 0x000977F8 File Offset: 0x000959F8
public override void GenerateIV()
{
this.IVValue = KeyBuilder.IV(DESTransform.BLOCK_BYTE_SIZE);
}
/// Generates a random key () to be used for the algorithm.
// Token: 0x06002F09 RID: 12041 RVA: 0x0009780C File Offset: 0x00095A0C
public override void GenerateKey()
{
this.KeyValue = DESTransform.GetStrongKey();
}
}
}