From 4662d18fdfc25d42d496cf6abb1c8d44be0c76dd Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Thu, 3 Jul 2025 09:45:18 +0200 Subject: refactor(decryption): ✨ Improve docstring for `decrypt_security_token` function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Enhanced clarity of the function's purpose and usage. - Added detailed descriptions for arguments and return values. --- tidal_dl_ng/helper/decryption.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tidal_dl_ng/helper/decryption.py b/tidal_dl_ng/helper/decryption.py index 17ea19b..2f38fc5 100644 --- a/tidal_dl_ng/helper/decryption.py +++ b/tidal_dl_ng/helper/decryption.py @@ -7,9 +7,17 @@ from Crypto.Util import Counter def decrypt_security_token(security_token: str) -> (str, str): """ - Decrypts security token into key and nonce pair + The `decrypt_security_token` function decrypts a security token into a key and nonce pair using AES + encryption. - security_token should match the securityToken value from the web response + Args: + security_token (str): The `security_token` parameter in the `decrypt_security_token` function is a + string that represents an encrypted security token. This function decrypts the security token into a + key and nonce pair using AES encryption. security_token should match the securityToken value from the web response. + + Returns: + The `decrypt_security_token` function returns a tuple containing the key and nonce extracted from + the decrypted security token. """ # Do not change this -- cgit v1.3.1