> For the complete documentation index, see [llms.txt](https://docs.petal.build/petal-pro-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petal.build/petal-pro-documentation/recipes/password-hashing-for-windows.md).

# Password Hashing for Windows

When creating a new Phoenix project, you can add authentication by running:

```bash
mix phx.gen.auth
```

If you do this on macOS or Linux, then Phoenix will use `bcrypt_elixir`. If you do this on a Windows machine, then it will use `pbkdf2_elixir`instead. You can find more on the pros and cons of choosing a hash system [here](https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Auth.html#module-password-hashing).

Petal Pro has been pre-generated with `bcrypt_elixir` - if you're on a Windows machine, you can switch by applying this recipe. This is much more convenient than trying to compile bcrypt on a Windows machine!

### How to use

This recipe is available for version `1.8.0` and above.

#### New projects

You can choose to check out the branch or cherry pick it.

```
git clone https://github.com/petalframework/petal_pro.git
cd petal_pro
git checkout recipes/<version>/win-pass-hash
```

#### Cherry pick

Follow the [cherry-pick instructions](/petal-pro-documentation/recipes/how-to-apply-a-recipe-with-git-cherry-pick.md) with the branch `recipes/<version>/win-pass-hash`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.petal.build/petal-pro-documentation/recipes/password-hashing-for-windows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
