SHA-1 for Gleam, supporting both Erlang and JavaScript
To add the library, simply execute the following command:
gleam add sha1
"Hello World"
|> bit_array.from_string()
|> sha1.hash
|> sha1.encode_hex
|> io.debug
// -> "0a4d55a8d778e5022fab701977c5d840bbc486d0"
Further documentation can be found at https://hexdocs.pm/sha1.
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell