A pure Luau implementation of the SHA-1 hashing algorithm. Blazing fast (for Luau) and well-tested.
The SHA-1 hash function MUST NOT be utilized for crytographic purposes. It is vulnerable to collision attacks. For more information, see this website.
This module returns a single function with the following type signature:
sha1(message: string): (string, {number})
The message
passed to this function will be hashed using the hashing algorithm. The hash is returned in two forms:
- As a sequence of 40 hexadecimal digits
- A read-only array of five 32-bit words that represent the hash