Esempio n. 1
0
    def atbash_decode(self):
        """Decode Atbash ciper
        
        Returns:
            Chepy: The Chepy oject. 

        Examples:
            >>> Chepy("hvxivg").atbash_decode().o
            "SECRET"
        """
        self.state = pycipher.Atbash().decipher(self._convert_to_str(), keep_punct=True)
        return self
Esempio n. 2
0
    def atbash_encode(self):
        """Encode with Atbash ciper
        
        Returns:
            Chepy: The Chepy oject. 

        Examples:
            >>> Chepy("secret").atbash_encode().o
            "HVXIVG"
        """
        self.state = pycipher.Atbash().encipher(self._convert_to_str(), keep_punct=True)
        return self
Esempio n. 3
0
def doatbash(cleartext):
    print pycipher.Atbash().encipher(cleartext, keep_punct=True)
Esempio n. 4
0
def atbashDecode(string):
	try:
		return pycipher.Atbash().decipher(string)
	
	except Exception as e:
		return f"Exception: {e}"
Esempio n. 5
0
def atbash(ciphertext):
    output=pycipher.Atbash().decipher(ciphertext, keep_punct=True)
    print("Atbash output: " + output )
    f=open('atbash.txt', 'w')
    f.write(output)
    f.close()