account.Password

class pyrogram.raw.types.account.Password

Configuration for two-factor authorization

Constructor of Password.

Details:
  • Layer: 227

  • ID: 957B50FB

Parameters:
  • new_algo (PasswordKdfAlgo) – The KDF algorithm for SRP two-factor authentication to use when creating new passwords

  • new_secure_algo (SecurePasswordKdfAlgo) – The KDF algorithm for telegram passport

  • secure_random (bytes) – Secure random string

  • has_recovery (bool, optional) – Whether the user has a recovery method configured

  • has_secure_values (bool, optional) – Whether telegram passport is enabled

  • has_password (bool, optional) – Whether the user has a password

  • current_algo (PasswordKdfAlgo, optional) – The KDF algorithm for SRP two-factor authentication of the current password

  • srp_B (bytes, optional) – Srp B param for SRP authorization

  • srp_id (int 64-bit, optional) – Srp ID param for SRP authorization

  • hint (str, optional) – Text hint for the password

  • email_unconfirmed_pattern (str, optional) – A password recovery email with the specified pattern is still awaiting verification

  • pending_reset_date (int 32-bit, optional) – The 2FA password will be automatically removed at this date, unless the user cancels the operation

  • login_email_pattern (str, optional) – A verified login email with the specified pattern is configured

Functions:

This object can be returned by 1 function.

account.GetPassword

Obtain configuration for two-factor authorization with password

TL Schema

account.password#957b50fb
flags:#
has_recovery:flags.0?true
has_secure_values:flags.1?true
has_password:flags.2?true
current_algo:flags.2?PasswordKdfAlgo
srp_B:flags.2?bytes
srp_id:flags.2?long
hint:flags.3?string
email_unconfirmed_pattern:flags.4?string
new_algo:PasswordKdfAlgo
new_secure_algo:SecurePasswordKdfAlgo
secure_random:bytes
pending_reset_date:flags.5?int
login_email_pattern:flags.6?string

= account.Password

Parameter Tree

Password
├── has_recovery → true (optional)
├── has_secure_values → true (optional)
├── has_password → true (optional)
├── current_algo → PasswordKdfAlgo (optional)
│ ├── salt1 → bytes
│ ├── salt2 → bytes
│ ├── g → int
│ └── p → bytes
├── srp_B → bytes (optional)
├── srp_id → long (optional)
├── hint → string (optional)
├── email_unconfirmed_pattern → string (optional)
├── new_algo → PasswordKdfAlgo
│ ├── salt1 → bytes
│ ├── salt2 → bytes
│ ├── g → int
│ └── p → bytes
├── new_secure_algo → SecurePasswordKdfAlgo
│ │ └── salt → bytes
│ └── salt → bytes
├── secure_random → bytes
├── pending_reset_date → int (optional)
└── login_email_pattern → string (optional)

Example

Password(
    new_algo=PasswordKdfAlgoUnknown(),
    new_secure_algo=SecurePasswordKdfAlgoUnknown(),
    secure_random=b"data",
)