





"""simple docstring"""





from __future__ import annotations

from string import ascii_letters




def 		lowerCAmelCase_     (  lowercase_       :							str			,				lowercase_       :							int			,				lowercase_       :							str | None = None		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      List[Any] 							=	alphabet or ascii_letters

 # The final result string
 __SCREAMING_SNAKE_CASE			:      List[Any] 							=	''''''

 for character in input_string:
  if character not in alpha:
   # Append without encryption if character is not in the alphabet
   result += character
  else:
   # Get the index of the new key and make sure it isn't too large
   __SCREAMING_SNAKE_CASE			:      Dict 							=	(alpha.index(lowercase_		) + key) % len(lowercase_		)

   # Append the encoded character to the alphabet
   result += alpha[new_key]

 return result




def 		lowerCAmelCase_     (  lowercase_       :							str			,				lowercase_       :							int			,				lowercase_       :							str | None = None		):

 '''simple docstring'''






 key *= -1

 return encrypt(lowercase_			,				lowercase_			,				lowercase_		)




def 		lowerCAmelCase_     (  lowercase_       :							str			,				lowercase_       :							str | None = None		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      Any 							=	alphabet or ascii_letters

 # To store data on all the combinations
 __SCREAMING_SNAKE_CASE			:      Dict 							=	{}

 # Cycle through each combination
 for key in range(1			,				len(lowercase_		) + 1		):
  # Decrypt the message and store the result in the data
  __SCREAMING_SNAKE_CASE			:      str 							=	decrypt(lowercase_			,				lowercase_			,				lowercase_		)

 return brute_force_data


if __name__ == "__main__":
    while True:
        print(f'\n{"-" * 10}\n Menu\n{"-" * 10}')
        print(*['''1.Encrypt''', '''2.Decrypt''', '''3.BruteForce''', '''4.Quit'''], sep='''\n''')

        # get user input
        _lowerCamelCase  					=     input('''\nWhat would you like to do?: ''').strip() or '''4'''

        # run functions based on what the user chose
        if choice not in ("1", "2", "3", "4"):
            print('''Invalid choice, please enter a valid choice''')
        elif choice == "1":
            _lowerCamelCase  					=     input('''Please enter the string to be encrypted: ''')
            _lowerCamelCase  					=     int(input('''Please enter off-set: ''').strip())

            print(encrypt(input_string, key))
        elif choice == "2":
            _lowerCamelCase  					=     input('''Please enter the string to be decrypted: ''')
            _lowerCamelCase  					=     int(input('''Please enter off-set: ''').strip())

            print(decrypt(input_string, key))
        elif choice == "3":
            _lowerCamelCase  					=     input('''Please enter the string to be decrypted: ''')
            _lowerCamelCase  					=     brute_force(input_string)

            for key, value in brute_force_data.items():
                print(f'Key: {key} | Message: {value}')

        elif choice == "4":
            print('''Goodbye.''')
            break








"""simple docstring"""





from ..utils import DummyObject, requires_backends





class       snake_case		(       metaclass=__UpperCAmelCase       ):
      lowerCamelCase__      =			['''torch''', '''transformers''', '''invisible_watermark''']

      def __init__(      self       :Optional[int]						,							*_lowerCamelCase       :int						,							**_lowerCamelCase       :Any						):
       requires_backends(self						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Dict						,							*_lowerCamelCase       :Optional[Any]						,							**_lowerCamelCase       :int						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)



      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Optional[int]						,							*_lowerCamelCase       :Optional[Any]						,							**_lowerCamelCase       :Union[str, Any]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)







class       snake_case		(       metaclass=__UpperCAmelCase       ):
      lowerCamelCase__      =			['''torch''', '''transformers''', '''invisible_watermark''']

      def __init__(      self       :Dict						,							*_lowerCamelCase       :Dict						,							**_lowerCamelCase       :Optional[Any]						):
       requires_backends(self						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Optional[int]						,							*_lowerCamelCase       :int						,							**_lowerCamelCase       :Optional[int]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)



      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :List[Any]						,							*_lowerCamelCase       :Dict						,							**_lowerCamelCase       :List[str]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

