{"id":18325045,"url":"https://github.com/maxdeviant/aragorn2","last_synced_at":"2026-03-19T03:55:22.326Z","repository":{"id":241380936,"uuid":"806754026","full_name":"maxdeviant/aragorn2","owner":"maxdeviant","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-30T04:31:57.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T19:44:43.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxdeviant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T20:41:54.000Z","updated_at":"2025-01-30T04:32:00.000Z","dependencies_parsed_at":"2024-05-28T03:59:00.013Z","dependency_job_id":"9bebf9e8-eafa-4160-ac76-b7f11c122d51","html_url":"https://github.com/maxdeviant/aragorn2","commit_stats":null,"previous_names":["maxdeviant/aragorn2"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/maxdeviant/aragorn2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Faragorn2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Faragorn2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Faragorn2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Faragorn2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdeviant","download_url":"https://codeload.github.com/maxdeviant/aragorn2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Faragorn2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28874143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T07:35:32.468Z","status":"ssl_error","status_checked_at":"2026-01-29T07:33:31.463Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T18:36:41.882Z","updated_at":"2026-01-29T09:40:07.767Z","avatar_url":"https://github.com/maxdeviant.png","language":"Gleam","readme":"# aragorn2\n\n[![Package Version](https://img.shields.io/hexpm/v/aragorn2)](https://hex.pm/packages/aragorn2)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/aragorn2/)\n![Erlang-compatible](https://img.shields.io/badge/target-erlang-b83998)\n\nSecure password hashing, powered by Argon2.\n\n## Platform support\n\n`aragorn2` uses a [NIF](https://www.erlang.org/doc/system/nif) to provide the Argon2 implementation. This NIF leverages the [`argon2`](https://crates.io/crates/argon2) crate, which is a pure Rust implementation of Argon2.\n\nPrecompiled binaries are available for the following platforms for your convenience:\n\n| OS      | Architecture(s) |\n| ------- | --------------- |\n| Linux   | x86_64          |\n| macOS   | aarch64, x86_64 |\n| Windows | x86_64          |\n\n## Installation\n\n```sh\ngleam add aragorn2\n```\n\n## Usage\n\n```gleam\nimport aragorn2\nimport gleam/io\n\npub fn main() {\n  // Create a hasher to use to hash and verify passwords.\n  //\n  // You can customize the hasher's parameters, but be mindful of the security\n  // implications! The defaults are based on the current OWASP recommendations,\n  // so don't change them unless you know what you are doing.\n  let hasher = aragorn2.hasher()\n\n  // Provide a plaintext password to be hashed:\n  let assert Ok(hashed_password) =\n    aragorn2.hash_password(hasher, \u003c\u003c\"correct horse battery staple\":utf8\u003e\u003e)\n  // This will return a hashed password that you can store (e.g., in your database).\n  // Reminder: Don't print out your hashed passwords in production.\n  io.debug(hashed_password)\n  // \"$argon2id$v=19$m=19456,t=2,p=1$SgDirmQl/Revk9+l7XtpZw$fz3xDI6cocCYpNB63FmMV4PhRpRTBK8KMuhYaWnAIKc\"\n\n  // When a user enters their candidate password, check it against the hashed\n  // password.\n  //\n  // When the candidate password does not match, an `Error` will be returned.\n  case\n    aragorn2.verify_password(\n      hasher,\n      candidate: \u003c\u003c\"wrong password\":utf8\u003e\u003e,\n      hash: \u003c\u003chashed_password:utf8\u003e\u003e,\n    )\n  {\n    Ok(Nil) -\u003e io.println(\"You're in!\")\n    Error(Nil) -\u003e io.println(\"Oops, wrong password!\") // \u003c--\n  }\n\n  // When the password does match, an `Ok` will be returned.\n  case\n    aragorn2.verify_password(\n      hasher,\n      candidate: \u003c\u003c\"correct horse battery staple\":utf8\u003e\u003e,\n      hash: \u003c\u003chashed_password:utf8\u003e\u003e,\n    )\n  {\n    Ok(Nil) -\u003e io.println(\"You're in!\") // \u003c--\n    Error(Nil) -\u003e io.println(\"Oops, wrong password!\")\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdeviant%2Faragorn2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdeviant%2Faragorn2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdeviant%2Faragorn2/lists"}