# PasswordEncryption

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.PasswordEncryption/

Password encryption algorithm enumeration.

- **Full name:** `MFiles.PasswordEncryption`
- **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_ENCRYPTION_RC4"></a>`PASSWORD_ENCRYPTION_RC4` | 0 | RC4-encrypted. |
| <a id="v-PASSWORD_ENCRYPTION_UNENCRYPTED"></a>`PASSWORD_ENCRYPTION_UNENCRYPTED` | 1 | Not encrypted. |
| <a id="v-PASSWORD_ENCRYPTION_AES256"></a>`PASSWORD_ENCRYPTION_AES256` | 2 | AES-encrypted with 256-bit key. |

<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.
- [IRPCLogin.GetPublicKey](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/GetPublicKey/index.md): Gets the server's RSA public key, for encrypting secrets that a client sends to the server.
- [IRPCLogin.GetPublicKeyAnonymous](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/GetPublicKeyAnonymous/index.md): Gets the server's RSA public key without a session, for encrypting authentication data before login.
- [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.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.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.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

- [`PasswordInfo.encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PasswordInfo/index.md#f-encryption): Encryption algorithm used to protect the password hash.
- [`ChangePasswordRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/ChangePassword/index.md#request): How the passwords are encrypted in transit.
- [`GetPublicKeyRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/GetPublicKey/index.md#request): Encryption for which the key is requested.
- [`GetPublicKeyAnonymousRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/GetPublicKeyAnonymous/index.md#request): Encryption for which the key is requested.
- [`GetPasswordHashRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetPasswordHash/index.md#request): How to encrypt the hash for transit: set `PASSWORD_ENCRYPTION_AES256`.
- [`ResetPasswordRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ResetPassword/index.md#request): Encryption used for the passwords in transit.
- [`GetVaultLoginPasswordHashRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/index.md#request): How the hash is encrypted for transit. Must not be `PASSWORD_ENCRYPTION_UNENCRYPTED`.
- [`ResetVaultLoginPasswordRequest.password_encryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword/index.md#request): How `new_password_hash` is encrypted. Must not be `PASSWORD_ENCRYPTION_UNENCRYPTED`.
