






def 				snake_case  (     lowerCamelCase				,  lowerCamelCase					):




	'''simple docstring'''







	__lowercase             =  """"""
	for i in table:
		res += inp[i - 1]
	return res





def 				snake_case  (     lowerCamelCase					):




	'''simple docstring'''







	return data[1:] + data[0]





def 				snake_case  (     lowerCamelCase				,  lowerCamelCase					):




	'''simple docstring'''







	__lowercase             =  """"""
	for i in range(len(lowerCamelCase					)					):
		if a[i] == b[i]:
			res += "0"
		else:
			res += "1"
	return res





def 				snake_case  (     lowerCamelCase				,  lowerCamelCase					):




	'''simple docstring'''







	__lowercase             =  int("""0b""" + data[0] + data[-1]				,  2					)
	__lowercase             =  int("""0b""" + data[1:3]				,  2					)
	return bin(s[row][col]					)[2:]





def 				snake_case  (     lowerCamelCase				,  lowerCamelCase				,  lowerCamelCase				,  lowerCamelCase				,  lowerCamelCase					):




	'''simple docstring'''







	__lowercase             =  message[:4]
	__lowercase             =  message[4:]
	__lowercase             =  apply_table(lowerCamelCase				,  lowerCamelCase					)
	__lowercase             =  xor(lowerCamelCase				,  lowerCamelCase					)
	__lowercase             =  apply_sbox(lowerCamelCase				,  temp[:4]					)  # noqa: E741
	__lowercase             =  apply_sbox(lowerCamelCase				,  temp[4:]					)
	__lowercase             =  """0""" * (2 - len(lowerCamelCase					)) + l  # noqa: E741
	__lowercase             =  """0""" * (2 - len(lowerCamelCase					)) + r
	__lowercase             =  apply_table(l + r				,  lowerCamelCase					)
	__lowercase             =  xor(lowerCamelCase				,  lowerCamelCase					)
	return temp + right


if __name__ == "__main__":
						__UpperCamelCase      :      Union[str, Any]     						=						input("""Enter 10 bit key: """)
						__UpperCamelCase      :      str     						=						input("""Enter 8 bit message: """)

						__UpperCamelCase      :      List[str]     						=						[6, 3, 7, 4, 8, 5, 10, 9]
						__UpperCamelCase      :      Tuple     						=						[3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
						__UpperCamelCase      :      Optional[Any]     						=						[2, 4, 3, 1]
						__UpperCamelCase      :      int     						=						[2, 6, 3, 1, 4, 8, 5, 7]
						__UpperCamelCase      :      int     						=						[4, 1, 3, 5, 7, 2, 8, 6]
						__UpperCamelCase      :      Dict     						=						[4, 1, 2, 3, 2, 3, 4, 1]
						__UpperCamelCase      :      Tuple     						=						[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
						__UpperCamelCase      :      str     						=						[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

						# key generation
						__UpperCamelCase      :      Dict     						=						apply_table(key, paa_table)
						__UpperCamelCase      :      str     						=						temp[:5]
						__UpperCamelCase      :      str     						=						temp[5:]
						__UpperCamelCase      :      Tuple     						=						left_shift(left)
						__UpperCamelCase      :      Union[str, Any]     						=						left_shift(right)
						__UpperCamelCase      :      Union[str, Any]     						=						apply_table(left + right, pa_table)
						__UpperCamelCase      :      Union[str, Any]     						=						left_shift(left)
						__UpperCamelCase      :      int     						=						left_shift(right)
						__UpperCamelCase      :      Any     						=						left_shift(left)
						__UpperCamelCase      :      List[str]     						=						left_shift(right)
						__UpperCamelCase      :      Optional[Any]     						=						apply_table(left + right, pa_table)

						# encryption
						__UpperCamelCase      :      int     						=						apply_table(message, IP)
						__UpperCamelCase      :      Dict     						=						function(expansion, sa, sa, keya, temp)
						__UpperCamelCase      :      Dict     						=						temp[4:] + temp[:4]
						__UpperCamelCase      :      Dict     						=						function(expansion, sa, sa, keya, temp)
						__UpperCamelCase      :      Union[str, Any]     						=						apply_table(temp, IP_inv)
						print("""Cipher text is:""", CT)

						# decryption
						__UpperCamelCase      :      Optional[Any]     						=						apply_table(CT, IP)
						__UpperCamelCase      :      Union[str, Any]     						=						function(expansion, sa, sa, keya, temp)
						__UpperCamelCase      :      str     						=						temp[4:] + temp[:4]
						__UpperCamelCase      :      Tuple     						=						function(expansion, sa, sa, keya, temp)
						__UpperCamelCase      :      Tuple     						=						apply_table(temp, IP_inv)
						print("""Plain text after decypting is:""", PT)









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


__UpperCamelCase      :      Tuple     						=						{
    """configuration_swiftformer""": [
        """SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """SwiftFormerConfig""",
        """SwiftFormerOnnxConfig""",
    ]
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__UpperCamelCase      :      Optional[Any]     						=						[
						    """SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """SwiftFormerForImageClassification""",
						    """SwiftFormerModel""",
						    """SwiftFormerPreTrainedModel""",
						]

if TYPE_CHECKING:
						from .configuration_swiftformer import (
						    SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    SwiftFormerConfig,
						    SwiftFormerOnnxConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_swiftformer import (
												    SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    SwiftFormerForImageClassification,
												    SwiftFormerModel,
												    SwiftFormerPreTrainedModel,
												)

else:
						import sys

						__UpperCamelCase      :      List[Any]     						=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

