You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

// System.Security.Cryptography.Aes
#if NET20
using System;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
namespace System.Security.Cryptography
{
internal abstract class Aes : SymmetricAlgorithm
{
private static KeySizes[] s_legalBlockSizes = new KeySizes[1] { new KeySizes(128, 128, 0) };
private static KeySizes[] s_legalKeySizes = new KeySizes[1] { new KeySizes(128, 256, 64) };
protected Aes()
{
base.LegalBlockSizesValue = s_legalBlockSizes;
base.LegalKeySizesValue = s_legalKeySizes;
base.BlockSizeValue = 128;
base.FeedbackSizeValue = 8;
base.KeySizeValue = 256;
base.ModeValue = CipherMode.CBC;
}
public new static Aes Create()
{
return Create("AES");
}
public new static Aes Create(string algorithmName)
{
if (algorithmName == null)
{
throw new ArgumentNullException("algorithmName");
}
return CryptoConfig.CreateFromName(algorithmName) as Aes;
}
}
}
#endif