CSharpTest.Net
Password Constructor(SecureString)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Crypto Namespace > Password Class > Password Constructor : Password Constructor(SecureString)

data

Glossary Item Box

Creates the password from the given data and salt

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal data As SecureString _
)
C# 
public Password( 
   SecureString data
)

Parameters

data

Example

Library/Library.Test/TestPassword.cs

C#Copy Code
using (Password p1 = new Password(TEST_PASSWORD))
using (SecureString sstr = p1.ToSecureString())
using (Password p2 = new Password(sstr))
{
    Assert.AreEqual(p1, p2);
}
VB.NETCopy Code
Using p1 As New Password(TEST_PASSWORD)
    Using sstr As SecureString = p1.ToSecureString()
        Using p2 As New Password(sstr)
            Assert.AreEqual(p1, p2)
        End Using
    End Using
End Using

Requirements

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

See Also

Generated with Document! X 2011 by Innovasys