from string import maketrans
      rot13trans = maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 
         'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm')
      # Function to translate plain text
      def rot13(text):
         return text.translate(rot13trans)
      def main():
         txt = "ROT13 Algorithm"
         print rot13(txt)
      	
      if __name__ == "__main__":
         main()
      
      Python language logo

      ROT13

      intermediate
      cryptography
      encoding

      Python Programming implementing ROT13 encoding

      ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cypher that replaces a letter with the 13th letter after it in the alphabet. ROT13 is a special case of the Caesar cypher which was developed in ancient Rome.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.