passwordler.decrypt_password
Module Contents
Functions
|
Decrypt an encrypted password using a simple substitution cipher. |
- passwordler.decrypt_password.decrypt_password(encrypted_password, random_seed=123)[source]
Decrypt an encrypted password using a simple substitution cipher.
The function uses a substitution cipher to decrypt an encrypted string. The original set is replaced with a randomly shuffled character from the same set. The random seed is utilized to make sure that the encryption and the decryption matches.
Parameters: - encrypted_password (str): The encrypted password to be decrypted. - random_seed (int): Seed for the random number generator to ensure that
encryption and decryption match. Default is 123.
Returns: - str: The decrypted password.
The function uses a substitution cipher where each character in the original set is replaced with a randomly shuffled character from the same set. The random seed is utilized to maintain consistent decryption results when needed.
Example: >>> original_password = ‘Monty Python’ >>> encrypted_password = encrypt_password(original_password, random_seed = 123) >>> decrypted_password = decrypt_password(encrypted_password, random_seed = 123) Output: ‘Monty Python’