toString
toString: (HashCode) -> stringThe bytes in lower-case hex, two digits each, in order.
HashCode.fromString(…)
HashCode.fromInt(…)
HashCode.fromBytes(…)| Method | Returns | Description |
|---|---|---|
toString() | string | The bytes in lower-case hex, two digits each, in order. |
bits() | number | How many bits the hash has (8 per byte). |
asInt() | number | The first four bytes as an int, little-endian; fewer than four is IllegalStateException. |
equals(any) | boolean | Whether other equals this HashCode, as == answers it (false for a value of another class). |
asBytes() | string | The hash's bytes, as a Luau string (any bytes). |
fromString(string) | HashCode | The hash string spells in lower-case hex (Guava refuses upper case): fewer than two characters, an odd count or another character is `Ill… |
fromInt(number) | HashCode | A 32-bit hash: hash's four bytes, little-endian. |
fromBytes(string | {number}) | HashCode | A hash of bytes (a Luau string, or an array of byte numbers), copied; none at all is IllegalArgumentException. |
| Method | Returns | Description |
|---|---|---|
HashCodeClass.fromBytes | HashCode | A hash of bytes (a Luau string, or an array of byte numbers), copied; none at all is IllegalArgumentException. |
HashCodeClass.fromInt | HashCode | A 32-bit hash: hash's four bytes, little-endian. |
HashCodeClass.fromString | HashCode | The hash string spells in lower-case hex (Guava refuses upper case): fewer than two characters, an odd count or another character is `Ill… |
Hasher.hash | HashCode | The hash of everything fed. Once: a second hash(), or a put after it, is IllegalStateException. |
HashFunction.hashBytes | HashCode | (HashFunction, string | {number}) -> HashCode: The hash of input's bytes (a Luau string of them, or an array of byte numbers): `Hashing… |
HashFunction.hashInt | HashCode | The hash of input's four bytes, little-endian. |
HashFunction.hashLong | HashCode | The hash of input's eight bytes, little-endian (exact below 2^53, as every Luau number is). |
HashFunction.hashString | HashCode | The hash of input's bytes in charset (input.getBytes(charset)). |
HashFunction.hashUnencodedChars | HashCode | The hash of input's UTF-16 code units, each little-endian (no charset). |
toStringtoString: (HashCode) -> stringThe bytes in lower-case hex, two digits each, in order.
bitsbits: (HashCode) -> numberHow many bits the hash has (8 per byte).
asIntasInt: (HashCode) -> numberThe first four bytes as an int, little-endian; fewer than four is IllegalStateException.
equalsequals: (HashCode, any) -> booleanWhether other equals this HashCode, as == answers it (false for a value of another class).
asBytesasBytes: (HashCode) -> stringThe hash's bytes, as a Luau string (any bytes).
fromStringfromString: (string) -> HashCodeThe hash string spells in lower-case hex (Guava refuses upper case): fewer than two characters, an odd count or another character is IllegalArgumentException.
fromIntfromInt: (number) -> HashCodeA 32-bit hash: hash's four bytes, little-endian.
fromBytesfromBytes: (string | {number}) -> HashCodeA hash of bytes (a Luau string, or an array of byte numbers), copied; none at all is IllegalArgumentException.