Module Expr Str ImportFrom alias ImportFrom alias Import alias Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Num Assign NameStore BinOpMult NameLoad Num TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse If CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd AttributeStore NameLoad attr Num orelse If CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num orelse If CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeStore NameLoad attr Num orelse If CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr Num Return Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad Str body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr NameLoad Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad Assign NameStore BinOpMod Call NameLoad NameLoad Num If UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Num NameLoad AugAssignAdd NameStore BinOpMult Call NameLoad NameLoad NameLoad Return SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice UnaryOpUSub NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assert Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return SubscriptLoad Call AttributeLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Slice AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd UnaryOpNot Call NameLoad NameLoad Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Delete NameDel Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot CompareEq NameLoad NameLoad body Assign NameStore BinOpMod Str Call AttributeLoad Call NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list
N/A N/A 
creates and updates crypto- and weak hashes. Operates on blocks of data.
 hashlib sha256 tools clean_string N/A struct N/A logging HashError N/A Exception N/A N/A N/A CryptError N/A HashError N/A N/A N/A N/A log N/A N/A logging getLogger convergent N/A KByte 1024 N/A MByte N/A KByte 1024 N/A N/A pycryptopp.cipher.aes AES N/A N/A N/A ImportError N/A Crypto.Cipher AES Counter N/A object N/A N/A  16 Byte binary counter
    
    Example:
        c = Counter()
        c() =>  * 16
        c() => ...01
     __init__ N/A N/A self a b c d N/A 0 0 0 0 N/A N/A N/A self a a N/A N/A self b b N/A N/A self c c N/A N/A self d d N/A N/A first True __call__ N/A N/A self N/A N/A N/A N/A self first N/A N/A N/A self first False N/A N/A N/A N/A self d 4294967295 N/A N/A N/A self d 1 N/A N/A N/A N/A self c 4294967295 N/A N/A N/A self c 1 N/A N/A self d 0 N/A N/A N/A N/A self b 4294967295 N/A N/A N/A self b 1 N/A N/A self c N/A self d 0 N/A N/A N/A N/A self a 4294967295 N/A N/A N/A self a 1 N/A N/A self b N/A self c N/A self d 0 N/A N/A N/A struct pack >4L N/A self a N/A self b N/A self c N/A self d N/A N/A aes N/A N/A key data counter N/A False N/A N/A  encrypt data with aes, using either pycryptopp or PyCrypto.
        Args
            key: The encryption key
            data: plain text data
            counter: a callable, usually not needed
     N/A N/A hasattr AES process N/A N/A a N/A AES key N/A N/A N/A a process data N/A counter N/A counter N/A Counter N/A a N/A N/A AES new key N/A AES MODE_CTR counter counter N/A rest N/A N/A len data 16 N/A N/A rest N/A N/A N/A N/A a encrypt data N/A pad N/A 16 rest N/A data N/A N/A chr pad pad N/A N/A N/A N/A a encrypt data N/A N/A pad N/A SHA256d N/A object N/A N/A  implements SHA-265d against length-extensions-attacks
        as defined by Schneier and Fergusson
     __init__ N/A N/A self data truncate_to N/A None None N/A N/A  SHA-265d against length-extensions-attacks
            with optional truncation of the hash

        Args:
            data: Initial string, optional
            truncate_to: length to truncate the hash to, optional
         N/A N/A self h N/A sha256 N/A N/A self truncate_to truncate_to N/A data N/A N/A N/A N/A N/A self h update data N/A update N/A N/A self data N/A N/A N/A N/A isinstance data str N/A N/A N/A N/A self h update data N/A digest N/A N/A self N/A N/A N/A N/A N/A N/A N/A sha256 N/A N/A N/A self h digest digest N/A N/A self truncate_to N/A hexdigest N/A N/A self N/A N/A N/A N/A N/A N/A N/A self digest encode hex N/A N/A ConvergentEncryption N/A object N/A N/A  provides convergent encryption and decryption

        This class provides convergent en-/decryption and provides
        a block id that can calculated from the encryption key.
        This class can be either used stand alone or as a mix-in.

        Attributes
            info: describes the cryptographic hash and the block
                  cipher algorithms used
     N/A info Digest: SHA-256d, Enc-Algo: AES 256 CTR N/A __convergence_secret None __init__ N/A N/A self secret warn N/A None True N/A N/A  initializes a ConvergentEncryption object

            Args
                secret: string, optional, to defeat confirmation-of-a-file attack
                warn: bool, default: True, log a warning if no secret was given

         N/A secret N/A N/A N/A N/A self set_convergence_secret secret N/A N/A warn N/A N/A N/A N/A self __warn_convergence warn False N/A set_convergence_secret N/A N/A self secret N/A N/A N/A  sets the secret used to defeat confirmation-of-a-file attack
         N/A secret N/A clean_string secret N/A N/A N/A self __convergence_secret N/A N/A self __convergence_secret secret N/A N/A msg Do not change the convergence secret during encryption! N/A N/A CryptError msg N/A N/A self __convergence_secret secret N/A __warn_convergence N/A N/A cls warn N/A True N/A N/A  Utter this warning only once per system run N/A N/A N/A N/A hasattr cls warned warn N/A N/A msg No convergence secret, some information may leak. N/A N/A N/A log warning msg N/A N/A cls warned True N/A classmethod __sec_key N/A N/A self data N/A N/A N/A  returns secret key and block id

            Args
                data: string
         N/A h N/A SHA256d data N/A N/A N/A self __convergence_secret N/A N/A N/A N/A self __warn_convergence N/A N/A N/A N/A h update N/A self __convergence_secret N/A key N/A N/A h digest N/A h N/A id N/A N/A N/A SHA256d key digest N/A N/A key id N/A encrypt N/A N/A self data N/A N/A N/A  encrypt data with convergence encryption.

            Args
                data: str, the plain text to be encrypted
        
            Returns
                key: hash(block), encryption key
                id: hash(hash(block), block ID
                ciphertext: enc(key, block)
         N/A N/A isinstance data str N/A N/A key id N/A N/A self __sec_key data N/A N/A key id N/A aes key data N/A decrypt N/A N/A self key ciphertext verify N/A False N/A N/A  decrypt data with convergence encryption.
        
            Args
                key: str, encryption key
                cipher: str, ciphertext
                verify: bool, verify decrypted data, default: False
        
            Returns
                the plain text
         N/A plain N/A aes key ciphertext N/A verify N/A N/A h N/A SHA256d plain N/A N/A self __convergence_secret N/A N/A N/A N/A h update N/A self __convergence_secret N/A digest N/A N/A h digest N/A N/A N/A self __convergence_secret N/A N/A key digest N/A N/A msg N/A Block verification error on %s. N/A N/A N/A SHA256d key hexdigest N/A N/A N/A log error msg N/A N/A CryptError msg N/A plain N/A N/A encrypt_key N/A N/A key nonce data N/A N/A N/A  use "key" and "nonce" to generate a one time key and en-/decrypt
        "data" with the one time key.

        Args
            key: encryption key
            nounce: exactly once used string (try a time-based UUID)
            data: the encrypted data
        Returns
            ciphertext: AES256 encrypted data
     N/A key N/A clean_string key N/A key N/A N/A N/A SHA256d key digest N/A nonce_hash N/A N/A N/A SHA256d nonce digest N/A enc_key N/A aes key nonce_hash N/A N/A aes enc_key data N/A