{"id":20018599,"url":"https://github.com/munkkeli/p4ssw0rd","last_synced_at":"2025-05-04T23:31:18.983Z","repository":{"id":35021176,"uuid":"197423980","full_name":"Munkkeli/p4ssw0rd","owner":"Munkkeli","description":"Hash passwords with SHA-256 + bcrypt in Node.js","archived":false,"fork":false,"pushed_at":"2022-12-30T18:16:37.000Z","size":149,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-29T15:05:46.518Z","etag":null,"topics":["bcrypt","hacktoberfest","nodejs","password","security","sha256","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Munkkeli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-17T16:16:33.000Z","updated_at":"2022-09-29T07:08:29.000Z","dependencies_parsed_at":"2023-01-15T12:10:57.227Z","dependency_job_id":null,"html_url":"https://github.com/Munkkeli/p4ssw0rd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munkkeli%2Fp4ssw0rd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munkkeli%2Fp4ssw0rd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munkkeli%2Fp4ssw0rd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munkkeli%2Fp4ssw0rd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Munkkeli","download_url":"https://codeload.github.com/Munkkeli/p4ssw0rd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252414230,"owners_count":21744067,"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":["bcrypt","hacktoberfest","nodejs","password","security","sha256","typescript"],"created_at":"2024-11-13T08:23:26.683Z","updated_at":"2025-05-04T23:31:13.957Z","avatar_url":"https://github.com/Munkkeli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p4ssw0rd\n\n[![Build Status](https://travis-ci.com/Munkkeli/p4ssw0rd.svg?branch=master)](https://travis-ci.com/Munkkeli/p4ssw0rd)\n\nGenerates secure password hashes with SHA-256 and bcrypt. Supports TypeScript.\n\n```bash\nnpm install p4ssw0rd\n```\n\n```js\nimport * as p4ssw0rd from 'p4ssw0rd';\n```\n\n- No password length limit\n- Output hash is always 60\n- Configurable bcrypt cost\n- Only one dependency!\n\nUses [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) to generate the bcrypt hash. For SHA-512 hash the [Node.js Crypto Module](https://nodejs.org/api/crypto.html) is used.\n\n## Usage\n\n### Hash\n\n```js\nconst hash = p4ssw0rd.hash(password, options?);\n```\n\nCreates a hash from supplied password. Hash will always be 60 characters long.\n\n### Check\n\n```js\nif (p4ssw0rd.check(password, hash, options?)) {\n  // Passwords match\n}\n```\n\nValidates the input password against a stored hash. Returns true if password is correct.\n\n### Simulate\n\n```js\np4ssw0rd.simulate();\n```\n\nSimulates validating a real hash. Usefull against timing attacks on login pages.\n\n### Options\n\n```js\n{\n  cost: 10, // The \"cost\" of bcrypt hash, default is 10\n}\n```\n\n## Contributing\n\n1. Clone the git repository\n2. `npm install` (Make sure `NODE_ENV` is not set to `production`)\n3. Make changes\n4. `npm run build`\n5. `npm test`\n\nThat's it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunkkeli%2Fp4ssw0rd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunkkeli%2Fp4ssw0rd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunkkeli%2Fp4ssw0rd/lists"}