Visual Basic (Declaration) | |
---|---|
Public Function CreateAlgorithm() As HashAlgorithm |
C# | |
---|---|
public HashAlgorithm CreateAlgorithm() |
Library/Library.Test/TestHash.cs
C# | Copy Code |
---|---|
foreach(int sz in new int [] { 16, 20, 32, 48, 64 }) { Hash test = Hash.FromBytes(new byte[sz]); HashAlgorithm ha = test.CreateAlgorithm(); Assert.IsNotNull(ha); Assert.AreEqual(sz, ha.ComputeHash(new byte[0]).Length); } |
VB.NET | Copy Code |
---|---|
For Each sz As Integer In New Integer() {16, 20, 32, 48, 64} Dim test As Hash = Hash.FromBytes(New Byte(sz) {}) Dim ha As HashAlgorithm = test.CreateAlgorithm() Assert.IsNotNull(ha) Assert.AreEqual(sz, ha.ComputeHash(New Byte(0) {}).Length) Next |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
Hash ClassHash Members
Source Code
Library/Crypto/Hash.csUsed By
Hash Hash.Combine(Hash)Hash Hash.Combine(Byte[])