Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Pevensie/argus
Erlang-based Argon2 Password Hashing for Gleam
https://github.com/Pevensie/argus
Last synced: 3 months ago
JSON representation
Erlang-based Argon2 Password Hashing for Gleam
- Host: GitHub
- URL: https://github.com/Pevensie/argus
- Owner: Pevensie
- License: mit
- Created: 2024-07-14T15:58:48.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-07T11:47:52.000Z (4 months ago)
- Last Synced: 2024-08-30T14:44:38.241Z (3 months ago)
- Language: Gleam
- Size: 10.7 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - argus - [📚](https://hexdocs.pm/argus/) - Argon2 password hashing library for Gleam, based on the reference C implementation. (Packages / Cryptography)
README
# Argus
Argon2 password hashing library for Gleam, based on the reference C implementation.
[![Package Version](https://img.shields.io/hexpm/v/argus)](https://hex.pm/packages/argus)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/argus/)This library uses another Pevensie project, [jargon](https://github.com/Pevensie/jargon), to provide the underlying NIF.
It currently only supports Gleam's Erlang backend.
## Example
```bash
gleam add argus
``````gleam
import arguspub fn main() {
// Hash a password using the recommended settings for Argon2id.
let assert Ok(hashes) =
argus.hasher()
|> argus.hash("password", gen_salt())// Hash a password with custom settings and a custom salt.
let assert Ok(hashes) =
argus.hasher()
|> argus.algorithm(argus.Argon2id)
|> argus.time_cost(3)
|> argus.memory_cost(12228) // 12 mebibytes
|> argus.parallelism(1)
|> argus.hash_length(32)
|> argus.hash("password", "custom_salt")// Verify a password.
let assert Ok(True) = argus.verify(hashes.encoded_hash, "password")
}
```More information can be found in the [documentation](https://hexdocs.pm/argus/).
## Why 'Argus'?
[Argus](https://en.wikipedia.org/wiki/Argus_(Argonaut)) was the builder of the
[Argo](https://en.wikipedia.org/wiki/Argo) ship and was one of the
[Argonauts](https://en.wikipedia.org/wiki/Argonauts).