Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / mscorlib / system / security / cryptography / rijndael.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 // <OWNER>Microsoft</OWNER>
7 // 
8
9 //
10 // Rijndael.cs
11 //
12
13 namespace System.Security.Cryptography
14 {
15 [System.Runtime.InteropServices.ComVisible(true)]
16
17     public abstract class Rijndael : SymmetricAlgorithm
18     {
19         private static  KeySizes[] s_legalBlockSizes = {
20           new KeySizes(128, 256, 64)
21         };
22
23         private static  KeySizes[] s_legalKeySizes = {
24             new KeySizes(128, 256, 64)
25         };
26
27         //
28         // protected constructors
29         //
30
31         protected Rijndael() {
32             KeySizeValue = 256;
33             BlockSizeValue = 128;
34             FeedbackSizeValue = BlockSizeValue;
35             LegalBlockSizesValue = s_legalBlockSizes;
36             LegalKeySizesValue = s_legalKeySizes;
37         }
38
39         //
40         // public methods
41         //
42
43         new static public Rijndael Create() {
44 #if FULL_AOT_RUNTIME
45             return new System.Security.Cryptography.RijndaelManaged ();
46 #else
47             return Create("System.Security.Cryptography.Rijndael");
48 #endif
49         }
50
51         new static public Rijndael Create(String algName) {
52             return (Rijndael) CryptoConfig.CreateFromName(algName);
53         }
54     }
55 }