{"id":20985794,"url":"https://github.com/fdionisi/deno-argon2","last_synced_at":"2025-06-25T05:33:41.309Z","repository":{"id":62420929,"uuid":"255615975","full_name":"fdionisi/deno-argon2","owner":"fdionisi","description":"Argon2 encryption library for Deno","archived":false,"fork":false,"pushed_at":"2023-04-21T08:55:11.000Z","size":55,"stargazers_count":18,"open_issues_count":5,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T08:35:49.834Z","etag":null,"topics":["argon2","deno"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/fdionisi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-04-14T13:24:51.000Z","updated_at":"2024-07-03T14:12:30.000Z","dependencies_parsed_at":"2024-11-18T14:53:36.735Z","dependency_job_id":"578bcb8b-418b-477a-92f2-3d825a9473c6","html_url":"https://github.com/fdionisi/deno-argon2","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdionisi%2Fdeno-argon2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdionisi%2Fdeno-argon2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdionisi%2Fdeno-argon2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdionisi%2Fdeno-argon2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdionisi","download_url":"https://codeload.github.com/fdionisi/deno-argon2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254194932,"owners_count":22030440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["argon2","deno"],"created_at":"2024-11-19T06:10:51.162Z","updated_at":"2025-05-14T17:32:15.841Z","avatar_url":"https://github.com/fdionisi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Argon2 for Deno\n\n[Argon2](https://github.com/P-H-C/phc-winner-argon2) encryption library for\n[Deno](https://deno.land).\n\nIt uses [rust-argon2](https://github.com/sru-systems/rust-argon2) under the\nhood.\n\n## Compatibility table\n\n| Library version | Deno Version |\n| --------------- | ------------ |\n| 0.6.0           | 1.0.0-1.0.3  |\n| 0.7.0           | 1.0.5        |\n| 0.8.0           | 1.2.3        |\n| 0.9.0           | 1.8.3        |\n\n## API\n\n- `hash(password: string, options?: HashOptions): Promise\u003cstring\u003e`\n\n- `verify(hash: string, password: string): Promise\u003cboolean\u003e`\n\n### Error handling\n\nIn case of error, all methods of this library will throw an\n[`Argon2Error`](lib/error.ts) type.\n\n## Usage\n\n### Library\n\n```ts\nimport { assert } from \"https://deno.land/std/testing/asserts.ts\";\nimport { hash, verify } from \"https://deno.land/x/argon2/lib/mod.ts\";\n\nlet hash = await hash(\"test\");\n\nassert(await verify(hash, \"test\"));\n```\n\n#### Testing\n\n```ts\nimport { Variant } from \"https://deno.land/x/argon2/lib/mod.ts\";\nimport { assertArgon2Encoded } from \"https://deno.land/x/argon2/lib/testing.ts\";\n\nDeno.test(\"User#password should be an argon2id variant password\", async () =\u003e {\n  assertArgon2Encoded(user.password, {\n    variant: Variant.Argon2id,\n  });\n});\n```\n\n### CLI\n\nThe library can be installed as a CLI tool via `deno install`.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eInstallation snippet\u003c/summary\u003e\n\n    ```sh\n    deno install \\\n      -A \\\n      --unstable \\\n      argon2 https://deno.land/x/argon2/cli/argon2.ts\n    ```\n\n\u003c/details\u003e\n\nAfter install run `--help` to inspect all possible commands.\n\n## Permissions\n\nThe library automatically downloads the static library and calls the static library's functions\nvia FFI(Foreign Function Interface) API ([Deno: ffi docs](https://deno.land/manual@v1.30.0/runtime/ffi_api)) and it\nrequires `--allow-read`, `--allow-write`, `--allow-net` and `--allow-ffi`.\n\n\u003cdetails\u003e\n\n    ```sh\n    deno \\\n      --allow-read \\\n      --allow-write \\\n      --allow-net \\\n      --allow-ffi \\\n      --unstable \\\n      lib/mod.ts\n    ```\n\n\u003c/details\u003e\n\n## Examples\n\nIn the `examples/` folder there you can find some usage examples.\n\n\u003e To run examples you must `--allow-run` since dev environment builds and\n\u003e initialize the Rust crate.\n\n_**Available examples**_\n\n- [Hash](examples/hash.ts)\n- [Hash with options](examples/hash-with-options.ts)\n- [Verify](examples/verify.ts)\n\n## Contributing\n\n### Project structure\n\n```sh\ndeno-argon2\n  ├── lib/      # Core library\n  ├── native/   # Native glue code\n  ├── cli/      # CLI wrapper\n  ├── tests/    # TypeScript tests\n  ├── benches/  # TypeScript benchmarks\n  └── examples/ # Development examples\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdionisi%2Fdeno-argon2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdionisi%2Fdeno-argon2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdionisi%2Fdeno-argon2/lists"}