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.
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 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