C# Class CK.Core.Util.Hash

Provides methods to combine hash values: use StartValue and then chain calls to the M:Combine methods. Based on Daniel J. Bernstein algorithm (http://cr.yp.to/cdb/cdb.txt).
Show file Open project: Invenietis/ck-core

Public Methods

Method Description
Combine ( System.Int64 hash, int value ) : long

Combines an existing hash value with a new one.

Combine ( long hash ) : long

Combines an existing hash value with multiples object's written directly as parameters.

Combine ( long hash, IEnumerable c ) : long

Combines an existing hash value with multiples object's hash.

Combine ( long hash, object o ) : long

Combines an existing hash value with an object's hash (object can be null).

Method Details

Combine() public static method

Combines an existing hash value with a new one.
public static Combine ( System.Int64 hash, int value ) : long
hash System.Int64 Current hash.
value int Value to combine.
return long

Combine() public static method

Combines an existing hash value with multiples object's written directly as parameters.
public static Combine ( long hash ) : long
hash long Current hash.
return long

Combine() public static method

Combines an existing hash value with multiples object's hash.
public static Combine ( long hash, IEnumerable c ) : long
hash long Current hash.
c IEnumerable Multiple objects. Can be null.
return long

Combine() public static method

Combines an existing hash value with an object's hash (object can be null).
public static Combine ( long hash, object o ) : long
hash long Current hash.
o object Object whose hash must be combined (can be null).
return long