1 // 2 // TestSuite.System.Security.Cryptography.AsymmetricAlgorithmTest.cs 3 // 4 // Author: 5 // Thomas Neidhart (tome@sbox.tugraz.at) 6 // 7 8 9 using System; 10 using System.Security.Cryptography; 11 12 using NUnit.Framework; 13 14 namespace MonoTests.System.Security.Cryptography { 15 16 [TestFixture] 17 public class AsymmetricAlgorithmTest 18 { 19 private AsymmetricAlgorithm _algo; 20 [SetUp] SetUp()21 public void SetUp() { 22 _algo = AsymmetricAlgorithm.Create(); 23 } 24 SetDefaultData()25 private void SetDefaultData() { 26 } 27 28 [Test] TestProperties()29 public void TestProperties() { 30 Assert.IsNotNull(_algo, "Properties (1)"); 31 32 KeySizes[] keys = _algo.LegalKeySizes; 33 foreach (KeySizes myKey in keys) { 34 for (int i = myKey.MinSize; i <= myKey.MaxSize; i += myKey.SkipSize) { 35 _algo.KeySize = i; 36 } 37 } 38 } 39 } 40 } 41