C# Class openHistorian.PerformanceTests.GuidSHA1Helper

This class is a helper class to quickly generate a strong hash code for a GUID type.
A strong hash function is important in Dictionary Lookups. If the hash is sufficently strong, a mod operation over the largest prime can be avoided, thus allowing for faster customized dictionary lookups. Method is the same as taking the last 4 bytes of a SHA1 hashsum, except zero is reserved and converted to 1.
Mostrar archivo Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
ComputeHash ( System.Guid input ) : int

Private Methods

Method Description
InternalHashBlock ( uint hash, uint words ) : void

Computes the hash of the blocks. Words must already be in big endian format.

SwapEndianSha ( ulong src, ulong dst ) : void

Method Details

ComputeHash() public static method

public static ComputeHash ( System.Guid input ) : int
input System.Guid
return int