K2Informatics.Erlnet.OtpErlangObject.Hash.combine C# (CSharp) Méthode

combine() public méthode

public combine ( byte b ) : void
b byte
Résultat void
            public void combine(byte[] b)
            {
                int j, k;
                for (j = 0, k = 0;
                     j + 4 < b.Length;
                     j += 4, k += 1, k %= 3)
                {
                    abc[k] += ((uint)b[j + 0] & 0xFF) + ((uint)b[j + 1] << 8 & 0xFF00)
                    + ((uint)b[j + 2] << 16 & 0xFF0000) + ((uint)b[j + 3] << 24);
                    mix();
                }
                for (int n = 0, m = 0xFF;
                     j < b.Length;
                     j++, n += 8, m <<= 8)
                {
                    abc[k] += (uint)(b[j] << n & m);
                }
                mix();
            }

Same methods

OtpErlangObject.Hash::combine ( int a ) : void
OtpErlangObject.Hash::combine ( int a, int b ) : void
OtpErlangObject.Hash::combine ( long a ) : void

Usage Example

Exemple #1
0
 public override int GetHashCode()
 {
     if (hashCodeValue == 0)
     {
         OtpErlangObject.Hash hash = new OtpErlangObject.Hash(5);
         hash.combine(local.GetHashCode() + remote.GetHashCode());
         hashCodeValue = hash.valueOf();
     }
     return hashCodeValue;
 }
All Usage Examples Of K2Informatics.Erlnet.OtpErlangObject.Hash::combine