telegram.EncryptedCredentials¶
-
class
telegram.
EncryptedCredentials
(data, hash, secret, bot=None, **kwargs)¶ Bases:
telegram.base.TelegramObject
Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
-
data
¶ telegram.Credentials
orstr
– Decrypted data with unique user’s nonce, data hashes and secrets used for EncryptedPassportElement decryption and authentication or base64 encrypted data.
-
hash
¶ str
– Base64-encoded data hash for data authentication.
-
secret
¶ str
– Decrypted or encrypted secret used for decryption.
Parameters: - data (
telegram.Credentials
orstr
) – Decrypted data with unique user’s nonce, data hashes and secrets used for EncryptedPassportElement decryption and authentication or base64 encrypted data. - hash (
str
) – Base64-encoded data hash for data authentication. - secret (
str
) – Decrypted or encrypted secret used for decryption. - **kwargs (
dict
) – Arbitrary keyword arguments.
Note
This object is decrypted only when originating from
telegram.PassportData.decrypted_credentials
.-
decrypted_data
¶ -
- Lazily decrypt and return credentials data. This object
- also contains the user specified nonce as decrypted_data.nonce.
Raises: telegram.TelegramDecryptionError
– Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data.
-
decrypted_secret
¶ str
– Lazily decrypt and return secret.Raises: telegram.TelegramDecryptionError
– Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data.
-