Visual Basic (Declaration) | |
---|---|
Public Class ModifiedRijndael Inherits System.Security.Cryptography.SymmetricAlgorithm |
C# | |
---|---|
public class ModifiedRijndael : System.Security.Cryptography.SymmetricAlgorithm |
Library/Library.Test/TestModifiedRijndael.cs
C# | Copy Code |
---|---|
RijndaelManaged r = new RijndaelManaged(); foreach (int blksz in AllKeySizes(r.LegalBlockSizes)) { r.BlockSize = blksz; r.GenerateIV(); foreach (int keysz in AllKeySizes(r.LegalKeySizes)) { r.KeySize = keysz; r.GenerateKey(); ModifiedRijndael modified = ModifiedRijndael.Create(typeof(ModifiedRijndael).FullName); modified.BlockSize = r.BlockSize; modified.KeySize = r.KeySize; modified.IV = r.IV; modified.Key = r.Key; modified.Padding = r.Padding; modified.Mode = r.Mode; TestEncryptDecrypt(r, modified); TestEncryptDecrypt(modified, r); } } |
VB.NET | Copy Code |
---|---|
Dim r As New RijndaelManaged() For Each blksz As Integer In AllKeySizes(r.LegalBlockSizes) r.BlockSize = blksz r.GenerateIV() For Each keysz As Integer In AllKeySizes(r.LegalKeySizes) r.KeySize = keysz r.GenerateKey() Dim modified As ModifiedRijndael = ModifiedRijndael.Create(GetType(ModifiedRijndael).FullName) modified.BlockSize = r.BlockSize modified.KeySize = r.KeySize modified.IV = r.IV modified.Key = r.Key modified.Padding = r.Padding modified.Mode = r.Mode TestEncryptDecrypt(r, modified) TestEncryptDecrypt(modified, r) Next Next |
System.Object
System.Security.Cryptography.SymmetricAlgorithm
CSharpTest.Net.Crypto.ModifiedRijndael
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
ModifiedRijndael MembersCSharpTest.Net.Crypto Namespace