{"id":24535107,"url":"https://github.com/jamesbroadberry/deno-bcrypt","last_synced_at":"2025-07-23T22:32:56.831Z","repository":{"id":37039828,"uuid":"262888026","full_name":"JamesBroadberry/deno-bcrypt","owner":"JamesBroadberry","description":"A port of jBCrypt to TypeScript for use as a Deno module","archived":false,"fork":false,"pushed_at":"2023-09-18T19:19:36.000Z","size":34,"stargazers_count":68,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T11:44:32.412Z","etag":null,"topics":["bcrypt","deno","hash","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JamesBroadberry.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-05-10T22:37:12.000Z","updated_at":"2025-04-14T05:26:55.000Z","dependencies_parsed_at":"2024-11-17T14:12:20.358Z","dependency_job_id":"34c563c4-06ac-4906-bd93-5a1088090a95","html_url":"https://github.com/JamesBroadberry/deno-bcrypt","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":0.3421052631578947,"last_synced_commit":"dd91a89347034de694602fbf118f8d3d9500115e"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/JamesBroadberry/deno-bcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2Fdeno-bcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2Fdeno-bcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2Fdeno-bcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2Fdeno-bcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesBroadberry","download_url":"https://codeload.github.com/JamesBroadberry/deno-bcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2Fdeno-bcrypt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266761341,"owners_count":23980288,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bcrypt","deno","hash","typescript"],"created_at":"2025-01-22T12:15:12.303Z","updated_at":"2025-07-23T22:32:56.809Z","avatar_url":"https://github.com/JamesBroadberry.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BCrypt\n\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/bcrypt/mod.ts)\n[![release](https://img.shields.io/github/v/release/jamesbroadberry/deno-bcrypt.svg?color=green\u0026label=latest)](https://github.com/JamesBroadberry/deno-bcrypt/releases)\n[![ci](https://github.com/JamesBroadberry/deno-bcrypt/workflows/ci/badge.svg)](https://github.com/JamesBroadberry/deno-bcrypt/actions)\n\nThis is a port from [jBCrypt](https://github.com/jeremyh/jBCrypt) to TypeScript\nfor use in [Deno](https://deno.land/).\n\nIt has zero third-party dependencies.\n\nRunning in sync requires no permissions. Running in async functionality requires\n--allow-net\n\n## Import\n\nIf you don't want to specify a specific version and are happy to work with\nbreaking changes, you can import this module like so:\n\n```ts\nimport * as bcrypt from \"https://deno.land/x/bcrypt/mod.ts\";\n```\n\nTo ensure that you've got a specific version, it's recommend to import this\nmodule specifying a\n[specific release](https://github.com/JamesBroadberry/deno-bcrypt/releases) like\nso:\n\n```ts\nimport * as bcrypt from \"https://deno.land/x/bcrypt@v0.3.0/mod.ts\";\n```\n\n## Usage\n\n### Async\n\nThe Async implementation requires WebWorkers which require --allow-net to import\nDeno standard modules from inside the Worker.\n\n```ts\nconst hash = await bcrypt.hash(\"test\");\n```\n\nTo check a password:\n\n```ts\nconst result = await bcrypt.compare(\"test\", hash);\n```\n\nTo hash a password with a manually generated salt:\n\n```ts\nconst salt = await bcrypt.genSalt(8);\nconst hash = await bcrypt.hash(\"test\", salt);\n```\n\n### Sync/Blocking\n\nIt is not recommended to use this unless you're running a quick script since the\nBCrypt algorithm is computationally quite expensive. For example, if you're\nrunning a server and make multiple calls to it, other requests will be blocked.\nUsing the Async methods are recommended.\n\nTo hash a password (with auto-generated salt):\n\n```ts\nconst hash = bcrypt.hashSync(\"test\");\n```\n\nTo check a password:\n\n```ts\nconst result = bcrypt.compareSync(\"test\", hash);\n```\n\nTo hash a password with a manually generated salt:\n\n```ts\nconst salt = bcrypt.genSaltSync(8);\nconst hash = bcrypt.hashSync(\"test\", salt);\n```\n\n### Older versions of Deno and/or BCrypt\n\nOlder versions of Deno will require an older version of this library\n(specifically \u003c 0.3.0) because of the introduction of `TextEncoder`. However,\nolder version of this library require the `--unstable` flag when running.\n\n## Warnings\n\nBCrypt v0.3.0 and below should NOT be used with Deno 1.23.0 or later since there's been a [breaking change in how Deno interprets the code](https://github.com/denoland/deno/issues/14900) and completely bypasses the cipher. Ensure that if you're running Deno 1.23.0 or later that you're using the latest version of BCrypt.\n\n## Issues\n\nFor any bug reports or feature requests, please create an issue on\n[GitHub](https://github.com/JamesBroadberry/deno-bcrypt/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbroadberry%2Fdeno-bcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesbroadberry%2Fdeno-bcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbroadberry%2Fdeno-bcrypt/lists"}