Parameters
- data
 
Library/Library.Test/TestPassword.cs
| C# |  Copy Code | 
|---|---|
byte[] bytes; byte[] svalue = Encoding.ASCII.GetBytes("some text value"); using (PasswordKey pk = new PasswordKey(TEST_PASSWORD)) bytes = pk.Encrypt(svalue); using (PasswordKey pk = new PasswordKey(TEST_PASSWORD)) bytes = pk.Decrypt(bytes); Assert.AreEqual(svalue, bytes);  | |
| VB.NET |  Copy Code | 
|---|---|
Dim bytes As Byte() Dim svalue As Byte() = Encoding.ASCII.GetBytes("some text value") Using pk As New PasswordKey(TEST_PASSWORD) bytes = pk.Encrypt(svalue) End Using Using pk As New PasswordKey(TEST_PASSWORD) bytes = pk.Decrypt(bytes) End Using Assert.AreEqual(svalue, bytes)  | |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
PasswordKey ClassPasswordKey Members
Overload List