# PasswordHashAlgorithm

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordHashAlgorithm/

Password hash algorithm enumeration. Each value corresponds to an algorithm with specific parameters.

- **Full name:** `MFiles.PasswordHashAlgorithm`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-PASSWORD_HASH_ALGORITHM_MD5"></a>`PASSWORD_HASH_ALGORITHM_MD5` | 0 | MD5 with fixed salt. |
| <a id="v-PASSWORD_HASH_ALGORITHM_UNDEFINED"></a>`PASSWORD_HASH_ALGORITHM_UNDEFINED` | 1 | Algorithm not defined. |
| <a id="v-PASSWORD_HASH_ALGORITHM_PBKDF2_WITH_SHA512_AND100000_ITERS"></a>`PASSWORD_HASH_ALGORITHM_PBKDF2_WITH_SHA512_AND100000_ITERS` | 2 | PBKDF2 with HMAC-SHA512 as pseudorandom function and iteration count 100000. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCLogin.ChangePassword](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/ChangePassword/index.md): Changes the M-Files password of the logged-in account.
- [IRPCLoginsAdmin.ResetPassword](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ResetPassword/index.md): Completes the "forgot password" flow: sets a new password for a login with the values from the password reset link.
- [IRPCVaultLoginsAdmin.ResetVaultLoginPassword](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword/index.md): Sets a new password for a vault login, authorized by a password reset link.

<a id="used-in-fields"></a>

## Used in fields

- [`AuthDataServerUnion.MFilesLeg1Data.password_hash_algorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AuthDataServerUnion/index.md#t-MFilesLeg1Data-password_hash_algorithm): The algorithm the account's password is stored with.
- [`PasswordInfo.hash_algorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PasswordInfo/index.md#f-hash_algorithm): Password hash algorithm.
- [`ChangePasswordRequest.password_hash_algorithm_desired`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/ChangePassword/index.md#request): The algorithm the server uses to store the new password.
- [`ResetPasswordRequest.password_hash_algorithm_desired`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ResetPassword/index.md#request): Algorithm to be used to hash the new password in the database.
- [`ResetVaultLoginPasswordRequest.password_hash_algorithm_new`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword/index.md#request): The algorithm the new password was hashed with.
