{"id":18473924,"url":"https://github.com/ohsayan/rcrypt","last_synced_at":"2026-03-04T21:02:08.772Z","repository":{"id":43683015,"uuid":"462574216","full_name":"ohsayan/rcrypt","owner":"ohsayan","description":"rcrypt is a compact hashing and salting library based on bcrypt that produces smaller hashes","archived":false,"fork":false,"pushed_at":"2022-09-13T10:35:17.000Z","size":35,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"next","last_synced_at":"2025-11-02T03:22:37.987Z","etag":null,"topics":["bcrypt","bmcf","cryptographic-hash-functions","cryptography","hashing","mcf","rcrypt","rust","salting"],"latest_commit_sha":null,"homepage":"https://docs.rs/rcrypt","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/ohsayan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-23T03:59:22.000Z","updated_at":"2025-09-09T23:35:34.000Z","dependencies_parsed_at":"2022-09-16T16:02:57.780Z","dependency_job_id":null,"html_url":"https://github.com/ohsayan/rcrypt","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ohsayan/rcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohsayan%2Frcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohsayan%2Frcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohsayan%2Frcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohsayan%2Frcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohsayan","download_url":"https://codeload.github.com/ohsayan/rcrypt/tar.gz/refs/heads/next","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohsayan%2Frcrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30092867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T20:42:30.420Z","status":"ssl_error","status_checked_at":"2026-03-04T20:42:30.057Z","response_time":59,"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":["bcrypt","bmcf","cryptographic-hash-functions","cryptography","hashing","mcf","rcrypt","rust","salting"],"created_at":"2024-11-06T10:27:11.185Z","updated_at":"2026-03-04T21:02:08.755Z","avatar_url":"https://github.com/ohsayan.png","language":"Rust","readme":"# `rcrypt`: A compact hashing and salting library\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ohsayan/rcrypt/Test?label=tests\u0026logo=rust\u0026style=flat-square) [![Crates.io](https://img.shields.io/crates/v/rcrypt?style=flat-square)](https://crates.io/crates/rcrypt) [![docs.rs](https://img.shields.io/docsrs/rcrypt?style=flat-square)](https://docs.rs/rcrypt) [![Crates.io](https://img.shields.io/crates/l/rcrypt?style=flat-square)](./LICENSE)\n\n`rcrypt`, short for \"reduced crypt\" is a compact hashing and salting library based on bcrypt **generating hashes that are 33.3% smaller than bcrypt** (40 bytes over 60 bytes).\n\nIt was originally made for a part of [Skytable](https://github.com/skytable/skytable)'s authentication\nsystem storage, but was moved into a separate library for usage in the wider Rust community.\n`rcrypt` is almost a drop-in replacement for the `bcrypt` crate. [Here's how it works](#how-it-works).\n\n## Usage\n\n```rust\nuse rcrypt::DEFAULT_COST;\n// your password\nlet mypass = String::from(\"pass123\");\n// hash\nlet hash = rcrypt::hash(\u0026mypass, DEFAULT_COST).unwrap();\n// verify\nassert!(rcrypt::verify(\u0026mypass, \u0026hash).unwrap());\n```\n\nThe usage remains just the same for users who use the [bcrypt](https://crates.io/crates/bcrypt) crate, except that the `hash` method returns a `Vec\u003cu8\u003e` instead of a `String`, while for the `verify` method you need to pass a `\u0026[u8]` for the hash.\n\n## Getting back your bcrypt hash\n\nIf for some reason you need a `String` with the bcrypt hash from your rcrypt hash, you can do that too!\nHere's the procedure:\n\n```rust\nuse rcrypt::DEFAULT_COST;\nlet rhash = rcrypt::hash(\"mypassword\", DEFAULT_COST).unwrap();\n// now let's get the bcrypt hash from the rcrypt hash\nlet bhash = rcrypt::bmcf::decode_into_mcf(\u0026rhash).unwrap();\n```\n\n## How it works\n\nThe smaller hash sizes result by `rcrypt` producing binary hashes and merging hash fields, in accordance\nwith the [BMCF spec](https://github.com/ademarre/binary-mcf).\n\n- The field separators in the MCF hash are not present in hashes generated by `rcrypt`\n- The cost and scheme fields are merged into one field\n- The hashes generated by rcrypt do not use base64 which results in lesser bytes being used to store the\n  salt+digest\n\n## Acknowledgements\n\n- The [Binary Modular Crypt Format specification](https://github.com/ademarre/binary-mcf) by [Andre DeMarre](https://github.com/ademarre)\n- The [original bcrypt implementation in Rust](https://github.com/Keats/rust-bcrypt) by [Vincent Prouillet](https://github.com/Keats). The underlying\n  bcrypt implementation used in this crate, and the public API are heavily inspired by the\n  [`bcrypt`](https://crates.io/crates/bcrypt) crate\n\n## License\n\nThis crate is distributed under the [Apache-2.0 License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohsayan%2Frcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohsayan%2Frcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohsayan%2Frcrypt/lists"}