recreates a hash from a base-64 encoded string
Syntax
Example
Library/Library.Test/TestPasswordHash.cs
C# | Copy Code |
---|
using (PasswordHash pwd1 = new PasswordHash(TEST_PASSWORD))
using (PasswordHash pwd2 = PasswordHash.FromString(pwd1.ToString()))
{
Assert.AreEqual(pwd1, pwd2);
Assert.AreEqual(pwd1.Salt.ToArray(), pwd2.Salt.ToArray());
Assert.AreEqual(pwd1.ToArray(), pwd2.ToArray());
} |
VB.NET | Copy Code |
---|
Using pwd1 As New PasswordHash(TEST_PASSWORD)
Using pwd2 As PasswordHash = PasswordHash.FromString(pwd1.ToString())
Assert.AreEqual(pwd1, pwd2)
Assert.AreEqual(pwd1.Salt.ToArray(), pwd2.Salt.ToArray())
Assert.AreEqual(pwd1.ToArray(), pwd2.ToArray())
End Using
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also