internal DESTransform(SymmetricAlgorithm symmAlgo, bool encryption, byte[] key, byte[] iv) : base(symmAlgo, encryption, iv)
{
byte[] array = null;
if (key == null)
{
key = DESTransform.GetStrongKey();
array = key;
}
if (DES.IsWeakKey(key) || DES.IsSemiWeakKey(key))
{
string text = Locale.GetText("This is a known weak, or semi-weak, key.");
throw new CryptographicException(text);
}
if (array == null)
{
array = (byte[])key.Clone();
}
this.keySchedule = new byte[DESTransform.KEY_BYTE_SIZE * 16];
this.byteBuff = new byte[DESTransform.BLOCK_BYTE_SIZE];
this.dwordBuff = new uint[DESTransform.BLOCK_BYTE_SIZE / 4];
this.SetKey(array);
}