System.HashID.HashID C# (CSharp) Метод

HashID() публичный Метод

public HashID ( byte hash ) : System.Globalization
hash byte
Результат System.Globalization
        public HashID(byte[] hash)
        {
            if(hash.Length != 32) throw new ArgumentException("Hash value length is incorrect. Length must be 32 bytes.", "hash");

            first = BitConverter.ToUInt64(hash, 0);
            second = BitConverter.ToUInt64(hash, 8);
            third = BitConverter.ToUInt64(hash, 16);
            fourth = BitConverter.ToUInt64(hash, 24);

            longhashcode = first ^ second ^ third ^ fourth;
            byte[] hca = BitConverter.GetBytes(longhashcode);
            int hcl = BitConverter.ToInt32(hca, 0); //Hash Code ulong Low
            int hch = BitConverter.ToInt32(hca, 4); //Hash Code ulong High
            hashcode = hcl ^ hch;
        }

Same methods

HashID::HashID ( string hash ) : System.Globalization