CSharpTest.Net
MaxRounds Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Crypto Namespace > ModifiedRijndael Class : MaxRounds Property

Glossary Item Box

Returns the Maximum value for Rounds given the current BlockSize and KeySize values

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property MaxRounds As Integer
C# 
public int MaxRounds {get;}

Example

Library/Library.Test/TestModifiedRijndael.cs

C#Copy Code
ModifiedRijndael r = new ModifiedRijndael();

foreach (int blksz in AllKeySizes(r.LegalBlockSizes))
{
    r.BlockSize = blksz;
    r.GenerateIV();
    Assert.AreEqual(blksz, r.IV.Length*8);

    foreach (int keysz in AllKeySizes(r.LegalKeySizes))
    {
        r.KeySize = keysz;
        r.GenerateKey();
        Assert.AreEqual(keysz, r.Key.Length*8);

        r.Rounds = r.NormalRounds;
        TestEncryptDecrypt(r, r);
        r.Rounds = r.MaxRounds;
        TestEncryptDecrypt(r, r);
    }
}
VB.NETCopy Code
Dim r As New ModifiedRijndael()

For Each blksz As Integer In AllKeySizes(r.LegalBlockSizes)
    r.BlockSize = blksz
    r.GenerateIV()
    Assert.AreEqual(blksz, r.IV.Length * 8)

    For Each keysz As Integer In AllKeySizes(r.LegalKeySizes)
        r.KeySize = keysz
        r.GenerateKey()
        Assert.AreEqual(keysz, r.Key.Length * 8)

        r.Rounds = r.NormalRounds
        TestEncryptDecrypt(r, r)
        r.Rounds = r.MaxRounds
        TestEncryptDecrypt(r, r)
    Next
Next

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys