2002-01-14 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / class / corlib / System.Security.Cryptography / KeySizes.cs
1 //\r
2 // System.Security.Cryptography KeySizes Class implementation\r
3 //\r
4 // Author:\r
5 //   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)\r
6 //\r
7 // Copyright 2001 by Matthew S. Ford.\r
8 //\r
9 \r
10 \r
11 namespace System.Security.Cryptography {\r
12         \r
13         /// <summary>\r
14         /// This class represents valid ranges of key sizes for ciphers.  It is also used to represent block sizes in the same fashion for block ciphers.\r
15         /// </summary>\r
16         public class KeySizes {\r
17                 private int _maxSize;\r
18                 private int _minSize;\r
19                 private int _skipSize;\r
20 \r
21                 /// <summary>\r
22                 /// Creates a new KeySizes object.\r
23                 /// </summary>\r
24                 /// <param name="minSize">The minimum size key allowed for this cipher.</param>\r
25                 /// <param name="maxSize">The maximum size key allowed for this cipher.</param>\r
26                 /// <param name="skipSize">The jump/skip between the valid key sizes.</param>\r
27                 public KeySizes (int minSize, int maxSize, int skipSize) {\r
28                         _maxSize = maxSize;\r
29                         _minSize = minSize;\r
30                         _skipSize = skipSize;\r
31                 }\r
32                 \r
33                 /// <summary>\r
34                 /// Returns the maximum valid key size;\r
35                 /// </summary>\r
36                 public int MaxSize {\r
37                         get {\r
38                                 return _maxSize;\r
39                         }\r
40                 }\r
41                 \r
42                 /// <summary>\r
43                 /// Returns the minimum valid key size;\r
44                 /// </summary>\r
45                 public int MinSize {\r
46                         get {\r
47                                 return _minSize;\r
48                         }\r
49                 }\r
50                 \r
51                 /// <summary>\r
52                 /// Returns the skip between valid key sizes;\r
53                 /// </summary>\r
54                 public int SkipSize {\r
55                         get {\r
56                                 return _skipSize;\r
57                         }\r
58                 }               \r
59         }\r
60 }\r
61 \r