MadelineProtoDocs/docs/API_docs/constructors/account_passwordInputSettings.md

49 lines
1.6 KiB
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: account.passwordInputSettings
description: 2FA password settings
2018-04-04 19:52:48 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
2018-04-01 13:19:25 +02:00
---
2018-04-05 01:19:57 +02:00
# Constructor: account.passwordInputSettings
2018-04-01 13:19:25 +02:00
[Back to constructors index](index.md)
2FA password settings
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2018-12-26 02:56:50 +01:00
|new\_algo|[PasswordKdfAlgo](../types/PasswordKdfAlgo.md) | Optional|New algo|
2018-04-01 13:19:25 +02:00
|new\_password\_hash|[bytes](../types/bytes.md) | Optional|`hash('sha256', $new_salt.$new_password.$new_salt, true)`|
2018-12-26 02:56:50 +01:00
|hint|[string](../types/string.md) | Optional|Hint|
|email|[string](../types/string.md) | Optional|Email|
|new\_secure\_settings|[SecureSecretSettings](../types/SecureSecretSettings.md) | Optional|New secure settings|
2018-04-01 13:19:25 +02:00
### Type: [account\_PasswordInputSettings](../types/account_PasswordInputSettings.md)
### Example:
```php
2018-12-26 02:56:50 +01:00
$account_passwordInputSettings = ['_' => 'account.passwordInputSettings', 'new_algo' => PasswordKdfAlgo, 'new_password_hash' => 'bytes', 'hint' => 'string', 'email' => 'string', 'new_secure_settings' => SecureSecretSettings];
2018-04-01 13:19:25 +02:00
```
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2018-12-26 02:56:50 +01:00
{"_": "account.passwordInputSettings", "new_algo": PasswordKdfAlgo, "new_password_hash": {"_": "bytes", "bytes":"base64 encoded bytes"}, "hint": "string", "email": "string", "new_secure_settings": SecureSecretSettings}
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
2018-04-01 13:19:25 +02:00
```lua
2018-12-26 02:56:50 +01:00
account_passwordInputSettings={_='account.passwordInputSettings', new_algo=PasswordKdfAlgo, new_password_hash='bytes', hint='string', email='string', new_secure_settings=SecureSecretSettings}
2018-04-01 13:19:25 +02:00
```