Functions for Decoding¶
This section of this documentation contains information on functions for decoding and decrypting.
-
dcoder.dcodefuncs.
ascii2text
(ascii_text)¶ Takes in a string ascii_text, returns the decoded plain text.
-
dcoder.dcodefuncs.
atbash2text
(encrypted_text)¶ Returns the decrypted text after decrypting the encrypted_text
- Parameters:
encrypted_text (str): The encrypted text in Atbash cipher
- Returns:
translated (str): The decrypted text
-
dcoder.dcodefuncs.
bin2text
(binary_text)¶ Takes in a string binary_text, returns the decoded plain text.
-
dcoder.dcodefuncs.
caesar2text
(encrypted_text, shift=3)¶ Returns the decrypted text after decrypting the encrypted_text
- Parameters:
encrypted_text (str): The encrypted text in Caesar’s cipher shift (int): The shift that should be used to decrypt the text
- Returns:
translated (str): The decrypted text
-
dcoder.dcodefuncs.
caesarBruteforce
(encrypted_text)¶ Returns a list of all the possibilities after decrypting the encrypted_text without using a shift.
- Parameters:
encrypted_text (str): The encrypted text in Caesar’s cipher
- Returns:
possibilities (list): All the possibilities of decryption
-
dcoder.dcodefuncs.
capitalLettersCipher
(ciphertext)¶ Returns the capital letters in the ciphertext
- Parameters:
ciphertext (str): The encrypted text
- Returns:
plaintext (str): The decrypted text
Example:
Cipher Text: dogs are cuter than HorsEs in a LooP.
Decoded Text: HELP
-
dcoder.dcodefuncs.
firstLetterCipher
(ciphertext)¶ Returns the first letters of each word in the ciphertext
- Parameters:
ciphertext (str): The encrypted text
- Returns:
plaintext (str): The decrypted text
Example:
Cipher Text: Horses evertime look positive
Decoded text: Help
-
dcoder.dcodefuncs.
hex2text
(hex_text)¶ Takes in a string hex_text, returns the decoded plain text.
-
dcoder.dcodefuncs.
oct2text
(oct_text)¶ Takes in a string oct_text, returns the decoded plain text.
-
dcoder.dcodefuncs.
railfence2text
(cipher, key=3)¶ Returns the decrypted text after decrypting the encrypted_text.
- Parameters:
encrypted_text (str): The encrypted text in railfence cipher key (int): The Key or the height of the rails
- Returns:
translated (str): The decrypted text
-
dcoder.dcodefuncs.
railfenceBruteforce
(encrypted_text)¶ Returns a list of all the possibilities after decrypting the encrypted_text without using a shift.
- Parameters:
encrypted_text (str): The encrypted text in Railfence Cipher
- Returns:
possibilities (list): All the possibilities of decryption
-
dcoder.dcodefuncs.
reverse
(text)¶ Takes in a string text, returns the text reversed