@@ -55,11 +55,10 @@ def decrypt(secret, hash, data, file=False):
5555 b64decode it.
5656
5757 Raises:
58- :class:`TelegramDecryptionError`: Raised if the given hash does not match the hash of
59- decrypted data
58+ :class:`TelegramDecryptionError`: Given hash does not match hash of decrypted data.
6059
6160 Returns:
62- :obj:`bytes`: The decrypted data as bytes
61+ :obj:`bytes`: The decrypted data as bytes.
6362
6463 """
6564 # First make sure that if secret, hash, or data was base64 encoded, to decode it into bytes
@@ -153,12 +152,11 @@ def de_json(cls, data, bot):
153152 @property
154153 def decrypted_secret (self ):
155154 """
156- :obj:`str`: The secret as decrypted using the bot's private key .
155+ :obj:`str`: Lazily decrypt and return secret .
157156
158157 Raises:
159- telegram.TelegramDecryptionError: If a decryption error happened while attempting
160- to decrypt the data. This is most often a wrong/missing private_key, but will
161- also happen in cases of tampered data.
158+ telegram.TelegramDecryptionError: Decryption failed. Usually due to bad
159+ private/public key but can also suggest malformed/tampered data.
162160 """
163161 if not self ._decrypted_secret :
164162 # Try decrypting according to step 1 at
@@ -181,14 +179,13 @@ def decrypted_secret(self):
181179 @property
182180 def decrypted_data (self ):
183181 """
184- :class:`telegram.Credentials`: Decrypted credentials that were used to decrypt
185- the data. This object also contains the user specified payload as
186- `decrypted_data.payload`.
182+ :class:`telegram.Credentials`: Lazily decrypt and return credentials data. This object
183+ also contains the user specified payload as
184+ `decrypted_data.payload`.
187185
188186 Raises:
189- telegram.TelegramDecryptionError: If a decryption error happened while attempting
190- to decrypt the data. This is most often a wrong/missing private_key, but will
191- also happen in cases of tampered data.
187+ telegram.TelegramDecryptionError: Decryption failed. Usually due to bad
188+ private/public key but can also suggest malformed/tampered data.
192189 """
193190 if not self ._decrypted_data :
194191 self ._decrypted_data = Credentials .de_json (decrypt_json (self .decrypted_secret ,
0 commit comments