{"id":22290766,"url":"https://github.com/mberry/bcrypter","last_synced_at":"2025-10-08T03:10:28.812Z","repository":{"id":57504767,"uuid":"153736296","full_name":"mberry/BCrypter","owner":"mberry","description":"Bcrypt in Rust.","archived":false,"fork":false,"pushed_at":"2021-01-18T16:45:11.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-13T07:40:01.554Z","etag":null,"topics":["bcrypt","cryptography","hashing","passwords"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mberry.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License-Apache.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-19T06:27:37.000Z","updated_at":"2021-01-18T16:45:13.000Z","dependencies_parsed_at":"2022-09-19T10:00:54.252Z","dependency_job_id":null,"html_url":"https://github.com/mberry/BCrypter","commit_stats":null,"previous_names":["mitchellberry/bcrypter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mberry/BCrypter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberry%2FBCrypter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberry%2FBCrypter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberry%2FBCrypter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberry%2FBCrypter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mberry","download_url":"https://codeload.github.com/mberry/BCrypter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberry%2FBCrypter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278882154,"owners_count":26062232,"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-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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","cryptography","hashing","passwords"],"created_at":"2024-12-03T17:14:05.457Z","updated_at":"2025-10-08T03:10:28.789Z","avatar_url":"https://github.com/mberry.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# BCrypter\n\n[![Crates.io](https://img.shields.io/crates/v/bcrypter.svg)](https://crates.io/crates/bcrypter) [![Build Status](https://travis-ci.com/MitchellBerry/BCrypter.svg?branch=master)](https://travis-ci.com/MitchellBerry/BCrypter) ![Crates.io](https://img.shields.io/crates/l/rustc-serialize.svg)\n\nA pure rust implementation of the bcrypt hashing function based on the Blowfish cipher. Currently only running on nightly builds. Full API documentation can be found [here](https://docs.rs/crate/bcrypter)\n\n## Installation\n\nIn your Cargo.toml file:\n\n```toml\n[dependencies]\nbcrypter = \"0.1.1\"\n```\n\n## Usage\n\n#### Basic hash\n```rust\nextern crate bcrypter;\nuse bcrypter::password;\n\nlet pw = \"hunter2\".to_string();\nlet bcrypt_hash = password(pw).hash().unwrap();\n```\n\n#### Custom cost\n```rust\nlet result = password(pw)\n                .cost(6)\n                .hash()\n                .unwrap();\n```\n\n#### Custom salt\n```rust\nlet salt = [0u8; 16];\nlet result = password(pw)\n                .salt(salt)\n                .cost(8)\n                .hash()\n                .unwrap();\n```\n#### Verify password\n```rust\nlet known_hash = \"$2a$04$7eAf8viXin8zazyvaU2HLuZGEbvaHy/lsnlG.HFWkBST5irHhXKJO\".to_string();\nlet correct_password : bool = password(pw)\n                                .verify(known_hash)\n                                .unwrap()\n```\n\n#### Raw digest\n```rust\nlet result = password(pw).hash().unwrap();\nlet digest_bytes : [u8: 24] = result.digest;\n```\n\n#### Notes\n\n* The default cost is 12 \n\n* A random 16 byte array is used when no salt parameter is provided.\n\n* The maximum password input is 72 bytes, anything over that will be truncated rather than raise an error. If you need larger inputs consider hashing it beforehand.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberry%2Fbcrypter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmberry%2Fbcrypter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberry%2Fbcrypter/lists"}