Visual Basic (Declaration) | |
---|---|
Public Class PasswordKey Inherits CryptoKey Implements IEncryptDecrypt |
C# | |
---|---|
public class PasswordKey : CryptoKey, IEncryptDecrypt |
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) |
System.Object
CSharpTest.Net.Crypto.CryptoKey
CSharpTest.Net.Crypto.PasswordKey
CSharpTest.Net.Crypto.Password
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
PasswordKey MembersCSharpTest.Net.Crypto Namespace