Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Num ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assert CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr If CompareNotIn NameLoad ListLoad Str Str Str body Raise Call NameLoad Str TryExcept body Assert CompareEq Call NameLoad NameLoad BinOpRShift Call NameLoad NameLoad Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Str TryExcept body Return TupleLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad NameLoad body Expr Str If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Num orelse Assign NameStore Num If NameLoad body Assign NameStore BinOpSub NameLoad BinOpMod Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AugAssignAdd NameStore BinOpMult NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad If NameLoad body Return Call NameLoad NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad body Expr Str If NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr If NameLoad body Assert CompareEq NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice AttributeLoad NameLoad attr If CompareIn NameLoad ListLoad Str Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad NameLoad Num Return Call AttributeLoad NameLoad attr Str decorator_list If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assert CompareEq NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Num Assert CompareEq NameLoad NameLoad
N/A N/A os Cryptodome Random Cryptodome.Cipher AES base64 b64encode b64decode future.utils tobytes six indexbytes N/A __author__ rolandh N/A POSTFIX_MODE N/A cbc cfb ecb N/A AES MODE_CBC N/A AES MODE_CFB N/A AES MODE_CFB N/A BLOCK_SIZE 16 AESError N/A Exception N/A N/A N/A build_cipher N/A N/A key iv alg N/A aes_128_cbc N/A N/A 
    :param key: encryption key
    :param iv: init vector
    :param alg: cipher algorithm
    :return: A Cipher instance
     N/A N/A typ bits cmode N/A N/A alg split _ N/A N/A iv N/A N/A iv N/A N/A N/A N/A Random new read N/A AES block_size N/A N/A N/A N/A len iv N/A AES block_size N/A N/A bits N/A 128 192 256 N/A N/A N/A AESError Unsupported key length N/A N/A N/A N/A N/A len key N/A N/A int bits 3 N/A N/A N/A AssertionError N/A N/A N/A AESError Wrong Key length N/A N/A N/A N/A N/A N/A AES new N/A tobytes key N/A POSTFIX_MODE N/A cmode N/A tobytes iv iv N/A N/A N/A KeyError N/A N/A N/A AESError Unsupported chaining mode N/A encrypt N/A N/A key msg iv alg padding b64enc block_size N/A None aes_128_cbc PKCS#7 True BLOCK_SIZE N/A N/A 
    :param key: The encryption key
    :param iv: init vector
    :param msg: Message to be encrypted
    :param padding: Which padding that should be used
    :param b64enc: Whether the result should be base64encoded
    :param block_size: If PKCS#7 padding which block size to use
    :return: The encrypted message
     N/A N/A padding PKCS#7 N/A N/A _block_size block_size N/A N/A N/A padding PKCS#5 N/A N/A _block_size 8 N/A N/A _block_size 0 N/A _block_size N/A N/A plen N/A _block_size N/A N/A len msg _block_size N/A c N/A chr plen N/A msg N/A c plen N/A N/A cipher iv N/A build_cipher N/A tobytes key iv alg N/A cmsg N/A iv N/A N/A cipher encrypt N/A tobytes msg N/A b64enc N/A N/A N/A b64encode cmsg N/A N/A cmsg N/A decrypt N/A N/A key msg iv padding b64dec N/A None PKCS#7 True N/A N/A 
    :param key: The encryption key
    :param iv: init vector
    :param msg: Base64 encoded message to be decrypted
    :return: The decrypted message
     N/A b64dec N/A N/A data N/A b64decode msg N/A N/A data msg N/A _iv N/A data N/A N/A AES block_size N/A iv N/A N/A N/A iv _iv N/A N/A cipher iv N/A build_cipher key iv N/A res N/A N/A N/A cipher decrypt data N/A N/A AES block_size N/A N/A padding N/A PKCS#5 PKCS#7 N/A N/A res N/A res N/A N/A N/A indexbytes res -1 N/A N/A N/A res decode utf-8 N/A N/A N/A __name__ __main__ N/A N/A key_ 1234523451234545 N/A msg_ ToBeOrNotTobe W.S. N/A iv_ N/A N/A os urandom 16 N/A encrypted_msg N/A encrypt key_ msg_ iv_ N/A txt N/A decrypt key_ encrypted_msg iv_ N/A N/A txt msg_ N/A encrypted_msg N/A encrypt key_ msg_ 0 N/A txt N/A decrypt key_ encrypted_msg 0 N/A N/A txt msg_