C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ComputeHash ( System.Guid input ) : int

Приватные методы

Метод Описание
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

Описание методов

ComputeHash() публичный статический Метод

public static ComputeHash ( System.Guid input ) : int
input System.Guid
Результат int