| |
- decipher_monoalphabetique(data: collections.abc.Iterable, key: Union[Dict[Any, Any], collections.abc.Iterable[Tuple[Any, Any]], Tuple[collections.abc.Iterable[Any, Any]]]) -> List[Any]
- This function implement monoalphabetique cipher.
key as dict:
- key: should contains any element of data
key as tuples:
- key[x][0] should contains any element of data
key as tuple:
- key[0] should contains any element of data
>>> decipher_monoalphabetique("B", {"A": "B"})
['A']
>>> decipher_monoalphabetique("B", [("A","B")])
['A']
>>> decipher_monoalphabetique("B", ("A","B"))
['A']
>>> decipher_monoalphabetique("B", 10)
Traceback (most recent call last):
...
TypeError: 'key' should be a Dict[Any, Any], a Tuple[Iterable[Any, Any]] or Iterable[Tuple[Any, Any]].
- decipher_viginere(char_data: Union[str, bytes], char_key: Union[str, bytes], alphabet: Union[str, bytes] = ['\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\t', '\n', '\x0b', '\x0c', '\r', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '\x7f', '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', '\xa0', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '\xad', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ'], *, alphabet_length: int = None) -> Union[str, int]
- This function implement VIGINERE cipher.
char_data: should be a str or bytes of length 1
char_key: should be a str or bytes of length 1
alphabet: should contains char_data and char_key
alphabet_length: should be the alphabet length
>>> decipher_viginere('C', 'C', string.ascii_uppercase)
'A'
>>> decipher_viginere(b'C', b'C', string.ascii_uppercase.encode('ascii'))
65
- monoalphabetique(data: collections.abc.Iterable, key: Union[Dict[Any, Any], collections.abc.Iterable[Tuple[Any, Any]], Tuple[collections.abc.Iterable[Any, Any]]]) -> List[Any]
- This function implement monoalphabetique cipher.
key as dict:
- key: should contains any element of data
key as tuples:
- key[x][0] should contains any element of data
key as tuple:
- key[0] should contains any element of data
>>> monoalphabetique("A", {"A": "B"})
['B']
>>> monoalphabetique("A", [("A","B")])
['B']
>>> monoalphabetique("A", ("A","B"))
['B']
>>> monoalphabetique("A", 10)
Traceback (most recent call last):
...
TypeError: 'key' should be a Dict[Any, Any], a Tuple[Iterable[Any, Any]] or Iterable[Tuple[Any, Any]].
- viginere(char_data: Union[str, bytes], char_key: Union[str, bytes], alphabet: Union[str, bytes] = ['\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\t', '\n', '\x0b', '\x0c', '\r', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '\x7f', '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', '\xa0', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '\xad', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ'], *, alphabet_length: int = None) -> Union[str, int]
- This function implement VIGINERE cipher.
char_data: should be a str or bytes of length 1
char_key: should be a str or bytes of length 1
alphabet: should contains char_data and char_key
alphabet_length: should be the alphabet length
>>> viginere('A', 'C', string.ascii_uppercase)
'C'
>>> viginere(b'A', b'C', string.ascii_uppercase.encode('ascii'))
67
- xor(a, b, /)
- Same as a ^ b.
|