putByte
putByte: (Hasher, number) -> HasherFeed one byte: the low 8 bits of b.
Hashing.sha256():newHasher()| Method | Returns | Description |
|---|---|---|
putByte(number) | Hasher | Feed one byte: the low 8 bits of b. |
putShort(number) | Hasher | Feed a short: the low 16 bits of s, little-endian. |
putInt(number) | Hasher | Feed an int, little-endian. |
putLong(number) | Hasher | Feed a long, little-endian (exact below 2^53, as every Luau number is). |
putFloat(number) | Hasher | Feed a float: f rounded to single precision, its raw bits little-endian. |
putDouble(number) | Hasher | Feed a double: its raw bits, little-endian. |
putBoolean(boolean) | Hasher | Feed a boolean: one byte, 1 or 0. |
putUnencodedChars(string) | Hasher | Feed charSequence's UTF-16 code units, each little-endian (no charset). |
putString(string, Charset) | Hasher | Feed charSequence's bytes in charset. |
hash() | HashCode | The hash of everything fed. Once: a second hash(), or a put after it, is IllegalStateException. |
equals(any) | boolean | Whether other equals this Hasher, as == answers it (false for a value of another class). |
putBytes(string | {number}) | Hasher | (Hasher, string | {number}) -> Hasher: Feed bytes (a Luau string of them, or an array of byte numbers). Returns the hasher. |
putBytes(string | {number}, number, number) | Hasher |
| Method | Returns | Description |
|---|---|---|
HashFunction.newHasher | Hasher | (HashFunction) -> Hasher: A new Hasher, empty. |
putByteputByte: (Hasher, number) -> HasherFeed one byte: the low 8 bits of b.
putShortputShort: (Hasher, number) -> HasherFeed a short: the low 16 bits of s, little-endian.
putIntputInt: (Hasher, number) -> HasherFeed an int, little-endian.
putLongputLong: (Hasher, number) -> HasherFeed a long, little-endian (exact below 2^53, as every Luau number is).
putFloatputFloat: (Hasher, number) -> HasherFeed a float: f rounded to single precision, its raw bits little-endian.
putDoubleputDouble: (Hasher, number) -> HasherFeed a double: its raw bits, little-endian.
putBooleanputBoolean: (Hasher, boolean) -> HasherFeed a boolean: one byte, 1 or 0.
putUnencodedCharsputUnencodedChars: (Hasher, string) -> HasherFeed charSequence's UTF-16 code units, each little-endian (no charset).
putStringputString: (Hasher, string, Charset) -> HasherFeed charSequence's bytes in charset.
hashhash: (Hasher) -> HashCodeThe hash of everything fed. Once: a second hash(), or a put after it, is IllegalStateException.
equalsequals: (Hasher, any) -> booleanWhether other equals this Hasher, as == answers it (false for a value of another class).
putBytesputBytes: ((Hasher, string | {number}) -> Hasher) & ((Hasher, string | {number}, number, number) -> Hasher)(Hasher, string | {number}) -> Hasher: Feed bytes (a Luau string of them, or an array of byte numbers). Returns the hasher.
(Hasher, string | {number}, number, number) -> Hasher: Feed len bytes of bytes from index off (0-based); a range outside it is IndexOutOfBoundsException. Returns the hasher.