2 // TestSuite.System.Security.Cryptography.AsymmetricAlgorithmTest.cs
5 // Thomas Neidhart (tome@sbox.tugraz.at)
10 using System
.Security
.Cryptography
;
12 using NUnit
.Framework
;
14 namespace MonoTests
.System
.Security
.Cryptography
{
16 public class AsymmetricAlgorithmTest
: TestCase
{
17 private AsymmetricAlgorithm _algo
;
18 protected override void SetUp() {
19 _algo
= AsymmetricAlgorithm
.Create();
22 private void SetDefaultData() {
25 public void TestProperties() {
26 Assert("Properties (1)", _algo
!= null);
30 KeySizes
[] keys
= _algo
.LegalKeySizes
;
31 foreach (KeySizes myKey
in keys
) {
32 for (int i
=myKey
.MinSize
; i
<=myKey
.MaxSize
; i
+=myKey
.SkipSize
) {
36 } catch (CryptographicException
) {thrown=true;}
37 Assert("Properties (2)", !thrown
);