The goog.crypt.hash32 Namespace

.CONSTANT32 {number}

Arbitrary constant used during hashing. See CONSTANT32 in http://go/base.hash.java

.SEED32 {number}

Default seed used during hashing, digits of pie. See SEED32 in http://go/base.hash.java

.encodeByteArray(bytes, opt_offset, opt_length, opt_seed)

Hashes a "byte" array to a 32-bit value using the supplied seed.

bytes {Array.<number>}
Array of bytes.
opt_offset {number=}
The starting position to use for hash computation.
opt_length {number=}
Number of bytes that are used for hashing.
opt_seed {number=}
The seed.
returns {number}
32-bit hash.

.encodeInteger(value)

Hashes an integer to a 32-bit value.

value {number}
Number to hash.
returns {number}
32-bit hash.

.encodeString(str)

Hashes a string to a 32-bit value.

str {string}
String to hash.
returns {number}
32-bit hash.

.encodeStringUtf8(str)

Hashes a string to a 32-bit value, converting the string to UTF-8 before doing the encoding.

str {string}
String to hash.
returns {number}
32-bit hash.