Block#
Encrypt#
- crypton.block.src.block_encrypt.encrypt(plain_text: str, a: numpy.ndarray, b: numpy.ndarray, space: str) str#
Encrypts the given text with given a, b and space
- Parameters
plain_text (str) – Text you want to encrypt
a (np.ndarray) – An integer that corresponds to the A parameter in block cypher
b (np.ndarray) – An integer that corresponds to the B parameter in block cypher
space (str) – Target space
- Returns
Encrypted text in string form
- Return type
str
Decrypt#
- crypton.block.src.block_decrypt.decrypt(plain_text: str, a: numpy.ndarray, b: numpy.ndarray, space: str) str#
Decrypts the given text with given a, b and space
- Parameters
plain_text (str) – Text you want to decrypt
a (np.ndarray) – An integer that corresponds to the A parameter in block cypher
b (np.ndarray) – An integer that corresponds to the B parameter in block cypher
space (str) – Target space
- Returns
Decrypted text in string form
- Return type
str
Helper#
- crypton.block.src.block_helper.get_cryption_functions(*args, **kwargs) Tuple[Callable, Callable]#
Returns encrypt and decrypt functions with the same a, b, and space
- Parameters
args – Arguments
kwargs – Keyword Arguments
- Returns
Encrypt and Decrypt functions
- Return type
(Function, Function)