{"id":18069207,"url":"https://github.com/viniciussanchez/bcrypt","last_synced_at":"2026-01-20T16:01:53.793Z","repository":{"id":39304271,"uuid":"240517419","full_name":"viniciussanchez/bcrypt","owner":"viniciussanchez","description":"BCrypt is a password hashing function","archived":false,"fork":false,"pushed_at":"2025-07-02T16:43:49.000Z","size":243,"stargazers_count":195,"open_issues_count":0,"forks_count":54,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-02T17:40:49.784Z","etag":null,"topics":["algorithm","bcrypt","delphi","embarcadero","fpc","freepascal","hash","hash-passwords","lazarus","password"],"latest_commit_sha":null,"homepage":"","language":"Pascal","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/viniciussanchez.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}},"created_at":"2020-02-14T13:44:24.000Z","updated_at":"2025-07-02T16:43:53.000Z","dependencies_parsed_at":"2024-01-09T01:01:52.270Z","dependency_job_id":"1a62c67e-8d14-42d7-b5d4-c9e32e14db18","html_url":"https://github.com/viniciussanchez/bcrypt","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/viniciussanchez/bcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciussanchez%2Fbcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciussanchez%2Fbcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciussanchez%2Fbcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciussanchez%2Fbcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viniciussanchez","download_url":"https://codeload.github.com/viniciussanchez/bcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciussanchez%2Fbcrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28606288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"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":["algorithm","bcrypt","delphi","embarcadero","fpc","freepascal","hash","hash-passwords","lazarus","password"],"created_at":"2024-10-31T08:09:35.625Z","updated_at":"2026-01-20T16:01:53.772Z","avatar_url":"https://github.com/viniciussanchez.png","language":"Pascal","readme":"# BCrypt\n![Platforms](https://img.shields.io/badge/Supported%20platforms-Windows,%20MacOS%20and%20Linux-green.svg)\n\nA library to help you hash passwords.\nYou can read about [bcrypt in Wikipedia](https://en.wikipedia.org/wiki/Bcrypt \"BCrypt\") as well as in the following article: [How To Safely Store A Password](https://codahale.com/how-to-safely-store-a-password/ \"How To Safely Store A Password\")\n\n![bcrypt](https://github.com/viniciussanchez/bcrypt/blob/master/img/bcrypt.png)\n\n# Installation\n\n### Via Boss\n\nFor ease I recommend using the [**Boss**](https://github.com/HashLoad/boss) (Dependency Manager for Delphi) for installation, simply by running the command below on a terminal (Windows PowerShell for example):\n\n```\nboss install https://github.com/viniciussanchez/bcrypt\n```\n\n### Manual\nIf you choose to install manually, simply add the following folders to your project, in *Project \u003e Options \u003e Resource Compiler \u003e Directories and Conditionals \u003e Include file search path*\n```\n../bcrypt/src\n```\n\n# Usage\n\n### Generate hash\n\n```pascal\nvar\n  LHash: string;\nbegin\n  LHash := TBCrypt.GenerateHash(password, cost, type);\nend;\n```\n\nWhere\n  * `password` is the password to be hashed\n  * `type` is one of THashType.PHP, THashType.BSD, or THashType.Default, THashType.BSD is the default $2a$\n  * `cost` is a number between 10 and 30, default is 10\n\n### Compare hash\n\n```pascal\nvar\n  LVerify : Boolean;\nbegin\n  LVerify := TBCrypt.CompareHash(password, hash);\nend;\n```\n\nWhere\n  * `password` is the password to be verified\n  * `hash` is a hash generated, similar to `$2y$12$GuC.Gk2YDsp8Yvga.IuSNOWM0fxEIsAEaWC1hqEI14Wa.7Ps3iYFq`\n  \n### Get hash info\n\n```pascal\nvar\n  LHashInfo: THashInfo;\n  LSalt, LHash: string;\n  LHashType: THashType;\n  LCost: Word;\nbegin\n  LHashInfo := TBCrypt.GetHashInfo(hash);\n  LCost := LHashInfo.Cost;\n  LSalt := LHashInfo.Salt;\n  LHash := LHashInfo.Hash;\n  LHashType := LHashInfo.\u0026Type;\n```  \n\nWhere\n  * `hash` is a hash generated \n  \n### Needs rehash\n\n```pascal\nvar\n  LNeeds : Boolean;\nbegin\n  LNeeds := TBCrypt.NeedsRehash(hash, cost);\nend;\n```\n\nWhere\n  * `hash` is a hash, similar to `$2y$12$GuC.Gk2YDsp8Yvga.IuSNOWM0fxEIsAEaWC1hqEI14Wa.7Ps3iYFq`\n  * `cost` is a number between 10 and 30, default is 10\n\n# Hash Info\nThe characters that comprise the resultant hash are:\n\n```\n./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\n```\n\nResultant hashes will be 60 characters long.\n\n![bcrypt-calculation-time](https://github.com/viniciussanchez/bcrypt/blob/master/img/bcrypt-calculation-time.png)\n\n# Credits\nThe code for this comes from a few sources:\n  * [Free Pascal BCrypt](https://github.com/hiraethbbs/pascal_bcrypt \"Free Pascal BCrypt\")\n  * [BCrypt for Delphi](https://github.com/JoseJimeniz/bcrypt-for-delphi \"BCrypt for Delphi\")\n","funding_links":[],"categories":["Encryption"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciussanchez%2Fbcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciussanchez%2Fbcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciussanchez%2Fbcrypt/lists"}