New test.
[mono.git] / mcs / class / corlib / Test / System.Security.Cryptography / SymmetricAlgorithm2Test.cs
index dd6e29a5492c6ca21da8436a56936b4c9ba2fe5d..4fa9c6d8212871e0bf6903887132a54133384b51 100644 (file)
@@ -60,6 +60,20 @@ namespace MonoTests.System.Security.Cryptography {
                        }
                }
 
+               [Test]
+               public void BlockSize_SameSize () 
+               {
+                       using (SymmetricAlgorithm algo = SymmetricAlgorithm.Create ()) {
+                               // get a copy of the IV
+                               byte[] iv = algo.IV;
+                               int bs = algo.BlockSize;
+                               // set the iv size
+                               algo.BlockSize = bs;
+                               // did it change the IV ? No!
+                               Assert ("IV", BitConverter.ToString (iv) == BitConverter.ToString (algo.IV));
+                       }
+               }
+
                [Test]
                [ExpectedException (typeof (CryptographicException))]
                public void InvalidBlockSize ()