{"id":15605114,"url":"https://github.com/ostinelli/phpass","last_synced_at":"2025-04-26T15:42:42.865Z","repository":{"id":57533106,"uuid":"228818730","full_name":"ostinelli/phpass","owner":"ostinelli","description":"A simple implementation of PHPass’ Portable Hash.","archived":false,"fork":false,"pushed_at":"2019-12-18T11:00:02.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T03:54:42.116Z","etag":null,"topics":["elixir-lang","erlang","phpass"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/ostinelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-18T10:46:02.000Z","updated_at":"2021-12-14T19:20:41.000Z","dependencies_parsed_at":"2022-09-26T18:20:52.456Z","dependency_job_id":null,"html_url":"https://github.com/ostinelli/phpass","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/ostinelli%2Fphpass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostinelli%2Fphpass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostinelli%2Fphpass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostinelli%2Fphpass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ostinelli","download_url":"https://codeload.github.com/ostinelli/phpass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250797725,"owners_count":21488962,"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":["elixir-lang","erlang","phpass"],"created_at":"2024-10-03T04:02:27.756Z","updated_at":"2025-04-25T10:27:48.832Z","avatar_url":"https://github.com/ostinelli.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ostinelli/phpass.svg?branch=master)](https://travis-ci.org/ostinelli/phpass) [![Hex pm](https://img.shields.io/hexpm/v/phpass.svg)](https://hex.pm/packages/phpass)\n\n# PHPass\nPHPass is an Erlang port of the [Portable PHP password hashing framework](https://www.openwall.com/phpass/). Only the `md5` hashing method is currently supported.\n\n## Setup\n\n### For Elixir\nAdd it to your deps:\n\n```elixir\ndefp deps do\n  [{:phpass, \"0.1.0\"}]\nend\n```\n\nEnsure that `phpass` is started with your application, for example by adding it to the list of your application's `extra_applications`:\n\n```elixir\ndef application do\n  [\n    extra_applications: [:logger, :phpass]\n  ]\nend\n```\n\n### For Erlang\nIf you're using [rebar3](https://github.com/erlang/rebar3), add `phpass` as a dependency in your project's `rebar.config` file:\n\n```erlang\n{deps, [\n  {phpass, {git, \"git://github.com/ostinelli/phpass.git\", {tag, \"0.1.0\"}}}\n]}.\n```\nOr, if you're using [Hex.pm](https://hex.pm/) as package manager (with the [rebar3_hex](https://github.com/hexpm/rebar3_hex) plugin):\n\n```erlang\n{deps, [\n  {phpass, \"0.1.0\"}\n]}.\n```\n\nEnsure that `phpass` is started with your application, for example by adding it in your `.app` file to the list of `applications`:\n\n```erlang\n{application, my_app, [\n    %% ...\n    {applications, [\n        kernel,\n        stdlib,\n        sasl,\n        phpass,\n        %% ...\n    ]},\n    %% ...\n]}.\n```\n\n## API\nExample code here below is in Erlang. Thanks to Elixir interoperability with Erlang, the equivalent code in Elixir is straightforward.\n\nTo hash a password:\n\n```erlang\nphpass:hash(Password) -\u003e\n    phpass:hash(Password, 13).\n```\n\n```erlang\nphpass:hash(Password, Rounds) -\u003e Hash.\n\nTypes:\n    Password = binary()\n    Rounds = non_neg_integer()\n    Hash = binary()\n```\n\nTo check a password:\n\n```erlang\nphpass:check(Password, Hash) -\u003e boolean().\n\nTypes:\n    Password = binary()\n    Hash = binary()\n```\n\n## Implementation details\nThis is a port of the ruby implementation [phpass-ruby](https://github.com/uu59/phpass-ruby). See original PHPass at [Openwall](https://www.openwall.com/phpass/).\n\n\n## Contributing\nSo you want to contribute? That's great! Please follow the guidelines below. It will make it easier to get merged in.\n\nBefore implementing a new feature, please submit a ticket to discuss what you intend to do. Your feature might already be in the works, or an alternative implementation might have already been discussed.\n\nDo not commit to master in your fork. Provide a clean branch without merge commits. Every pull request should have its own topic branch. In this way, every additional adjustments to the original pull request might be done easily, and squashed with `git rebase -i`. The updated branch will be visible in the same pull request, so there will be no need to open new pull requests when there are changes to be applied.\n\nEnsure that proper testing is included. To run tests you simply have to be in the project's root directory and run:\n\n```bash\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fostinelli%2Fphpass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fostinelli%2Fphpass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fostinelli%2Fphpass/lists"}