Functions for Encoding¶
This section of this documentation contains information on functions for encoding and encrypting.
-
dcoder.encodefuncs.text2ascii(text)¶ Takes in a string text, returns the encoded text in ascii.
-
dcoder.encodefuncs.text2atbash(text)¶ Returns the encrypted text after encrypting the text
- Parameters:
text (str): The text that needs to be encrypted in the Atbash cipher
- Returns:
translated (str): The encrypted text
-
dcoder.encodefuncs.text2bin(text)¶ Takes in a string text, returns the encoded text in bin.
-
dcoder.encodefuncs.text2caesar(text, shift=3)¶ Returns the encrypted text after encrypting the text with the given shift
- Parameters:
text (str): The text that needs to be encrypted in Caesar’s cipher shift (int): The shift that should be used to encrypt the text
- Returns:
result (str): The encrypted text
-
dcoder.encodefuncs.text2hex(text)¶ Takes in a string text, returns the encoded text in hex.
-
dcoder.encodefuncs.text2oct(text)¶ Takes in a string text, returns the encoded text in oct.
-
dcoder.encodefuncs.text2railfence(text, key=3)¶ Returns the encrypted text after encrypting the text with the given key
- Parameters:
text (str): The text that needs to be encrypted in the Railfence cipher key (int): The Key that should be used to encrypt the text
- Returns:
encrypted (str): The encrypted text