Creates a comparable Hash object from the base-64 encoded hashcode bytes
Syntax
Example
Library/Library.Test/TestHash.cs
C# | Copy Code |
---|
Hash hash = Hash.MD5(TestData);
Hash copy = Hash.FromBytes(hash.ToArray());
Assert.AreEqual(hash, copy);
Assert.AreEqual(hash.ToString(), copy.ToString());
copy = Hash.FromString(hash.ToString());
Assert.AreEqual(hash, copy);
Assert.AreEqual(hash.ToString(), copy.ToString()); |
VB.NET | Copy Code |
---|
Dim hash As Hash = Hash.MD5(TestData)
Dim copy As Hash = Hash.FromBytes(hash.ToArray())
Assert.AreEqual(hash, copy)
Assert.AreEqual(hash.ToString(), copy.ToString())
copy = Hash.FromString(hash.ToString())
Assert.AreEqual(hash, copy)
Assert.AreEqual(hash.ToString(), copy.ToString()) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also