|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Versioning;
using Internal.Cryptography;
namespace System.Security.Cryptography
{
[Obsolete(Obsoletions.RijndaelMessage, DiagnosticId = Obsoletions.RijndaelDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class Rijndael : SymmetricAlgorithm
{
[UnsupportedOSPlatform("browser")]
public static new Rijndael Create()
{
return new RijndaelImplementation();
}
[Obsolete(Obsoletions.CryptoStringFactoryMessage, DiagnosticId = Obsoletions.CryptoStringFactoryDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[RequiresUnreferencedCode(CryptoConfig.CreateFromNameUnreferencedCodeMessage)]
public static new Rijndael? Create(string algName)
{
return (Rijndael?)CryptoConfig.CreateFromName(algName);
}
protected Rijndael()
{
LegalBlockSizesValue = s_legalBlockSizes.CloneKeySizesArray();
LegalKeySizesValue = s_legalKeySizes.CloneKeySizesArray();
KeySizeValue = 256;
BlockSizeValue = 128;
FeedbackSizeValue = BlockSizeValue;
}
private static readonly KeySizes[] s_legalBlockSizes =
{
new KeySizes(minSize: 128, maxSize: 256, skipSize: 64)
};
private static readonly KeySizes[] s_legalKeySizes =
{
new KeySizes(minSize: 128, maxSize: 256, skipSize: 64)
};
}
}
|