# PasswordInfo

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) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Information on password, possibly hashed and/or encrypted.

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

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-hash"></a>`hash` | `string` | 1 | Password hash. |
| <a id="f-hash_algorithm"></a>`hash_algorithm` | [`PasswordHashAlgorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordHashAlgorithm/index.md) | 2 | Password hash algorithm. Values: `PASSWORD_HASH_ALGORITHM_MD5` (0), `PASSWORD_HASH_ALGORITHM_UNDEFINED` (1), `PASSWORD_HASH_ALGORITHM_PBKDF2_WITH_SHA512_AND100000_ITERS` (2). |
| <a id="f-salt"></a>`salt` | `string` | 3 | Password salt. |
| <a id="f-encryption"></a>`encryption` | [`PasswordEncryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordEncryption/index.md) | 4 | Encryption algorithm used to protect the password hash. Values: `PASSWORD_ENCRYPTION_RC4` (0), `PASSWORD_ENCRYPTION_UNENCRYPTED` (1), `PASSWORD_ENCRYPTION_AES256` (2). |

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

## Used by methods

- [IRPCLoginsAdmin.AddLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/AddLogin/index.md): Adds a login account to the server.
- [IRPCLoginsAdmin.GetPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetPasswordHash/index.md): Gets the encrypted password hash of an M-Files login, for copying the password to another server with [SetPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/SetPasswordHash/index.md).
- [IRPCLoginsAdmin.ModifyLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ModifyLogin/index.md): Changes a login account: its server roles and enabled state, and optionally its password, full name, e-mail address and license type.
- [IRPCLoginsAdmin.SetPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/SetPasswordHash/index.md): Sets the password of an M-Files login from a password hash, for example one read with [GetPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetPasswordHash/index.md) on another server.
- [IRPCVaultLoginsAdmin.AddVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/AddVaultLogin/index.md): Adds a login account to the vault.
- [IRPCVaultLoginsAdmin.GetVaultLoginPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/index.md): Reads the password hash of a vault login, encrypted with a public key that the caller supplies.
- [IRPCVaultLoginsAdmin.ModifyVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin/index.md): Changes the server roles, password, full name, email address or license type of a vault login.
- [IRPCVaultLoginsAdmin.SetVaultLoginPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/SetVaultLoginPasswordHash/index.md): Sets the password of a vault login from a password hash.

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

## Used in fields

- [`GetPasswordHashResponse.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetPasswordHash/index.md#response): The encrypted hash with its hash algorithm and salt.
- [`SetPasswordHashRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/SetPasswordHash/index.md#request): The password hash with its algorithm, salt and transit encryption.
- [`AddLoginRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/AddLogin/index.md#request): The encrypted password hash of an M-Files login.
- [`ModifyLoginRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ModifyLogin/index.md#request): The new encrypted password hash. Used only when `change_password` is true.
- [`GetVaultLoginPasswordHashResponse.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/index.md#response): The encrypted password hash with its algorithm and salt.
- [`SetVaultLoginPasswordHashRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/SetVaultLoginPasswordHash/index.md#request): The new password hash, for example as read with [GetVaultLoginPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/index.md).
- [`AddVaultLoginRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/AddVaultLogin/index.md#request): The encrypted password hash, for an M-Files login.
- [`ModifyVaultLoginRequest.password_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin/index.md#request): The new encrypted password hash. Used only with `change_password`.
