DevForce Help Reference
CalcStringHash Method (CryptoFns)


Returns a hash encoded as a string with the chars (A-Z,A-z,0-9,_) only.
Syntax
'Declaration
 
Public Shared Function CalcStringHash( _
   ByVal stringToHash As String, _
   ByVal maxChars As Integer _
) As String
'Usage
 
Dim stringToHash As String
Dim maxChars As Integer
Dim value As String
 
value = CryptoFns.CalcStringHash(stringToHash, maxChars)
public static string CalcStringHash( 
   string stringToHash,
   int maxChars
)

Parameters

stringToHash
maxChars
Remarks
Under the covers this method returns an 128 bit hash code calculated using SHA1. This code is then encoded into an approx Base64 encode of the chars listed above. This will usually be approx 28 chars in length, which may then be truncated based on the maxChars parameter. This method can process approx 100K 300 char strings a second.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CryptoFns Class
CryptoFns Members

Send Feedback