[docs] Import of Microsoft BCL Documentation.
[mono.git] / mcs / class / corlib / System.Security.Cryptography / SymmetricAlgorithm.cs
index 60b57e7e7536b33dd99ebfab6ab36f4be80bae13..ba713e8c6e5a3b41374f05672ec3e3421147f111 100644 (file)
@@ -42,16 +42,9 @@ namespace System.Security.Cryptography {
                protected byte[] KeyValue; 
                protected KeySizes[] LegalBlockSizesValue; 
                protected KeySizes[] LegalKeySizesValue; 
-#if MOONLIGHT
-               // Silverlight 2.0 only supports CBC
-               internal int FeedbackSizeValue;
-               internal CipherMode ModeValue;
-               internal PaddingMode PaddingValue;
-#else
                protected int FeedbackSizeValue;
                protected CipherMode ModeValue;
                protected PaddingMode PaddingValue;
-#endif
                private bool m_disposed;
 
                protected SymmetricAlgorithm ()
@@ -114,6 +107,10 @@ namespace System.Security.Cryptography {
                                        throw new CryptographicException (
                                                Locale.GetText ("feedback size larger than block size"));
                                }
+                               if ((value & 3) != 0) {
+                                       throw new CryptographicException (
+                                               Locale.GetText ("feedback size must be a multiple of 8 (bits)"));
+                               }
                                this.FeedbackSizeValue = value;
                        }
                }