Module Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot CompareEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If BoolOpOr CompareEq Str AttributeLoad NameLoad attr CompareEq Num NameLoad body Return Str Assign NameStore IfExp CompareNotEq NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BoolOpOr CompareEq NameLoad NameLoad CompareNotEq Call NameLoad NameLoad NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad BinOpSub Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore BinOpSub Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore AttributeStore NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body If UnaryOpNot CompareEq AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr keyword BinOpAdd Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot CompareEq Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult Num Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq Call NameLoad NameLoad NameLoad body Break decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Assign NameStore BinOpAdd NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult Num Num If Call NameLoad NameLoad NameLoad body With Call NameLoad NameLoad Str NameStore body While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Break Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad TryFinally body While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Break Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A hashlib N/A hmac N/A os N/A tempfile decorator StoreDecorator _HMACFileReader N/A object N/A __init__ N/A N/A self hm source N/A N/A N/A N/A self hm hm N/A N/A self source source N/A N/A self buffer N/A N/A source read N/A N/A self hm digest_size N/A N/A N/A N/A len N/A self buffer N/A N/A self hm digest_size N/A N/A N/A VerificationException Source does not contain HMAC hash (too small) N/A read N/A N/A self n N/A None N/A N/A N/A N/A N/A self buffer N/A 0 n N/A N/A N/A new_read N/A N/A None n N/A N/A N/A self source read n N/A N/A N/A self source read N/A finished N/A N/A None n N/A N/A len new_read n N/A N/A self buffer new_read N/A N/A None n N/A N/A offset N/A min n N/A N/A len N/A self buffer N/A N/A self hm digest_size N/A N/A offset N/A N/A len N/A self buffer N/A N/A self hm digest_size N/A N/A rv N/A self buffer N/A N/A N/A self buffer N/A offset N/A N/A self buffer N/A offset N/A N/A N/A N/A self hm update rv N/A finished N/A N/A N/A N/A N/A self buffer N/A N/A N/A self hm digest N/A N/A N/A VerificationException HMAC verification failed. N/A rv N/A close N/A N/A self N/A N/A N/A N/A N/A N/A self source close N/A __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self N/A args N/A N/A N/A N/A self close N/A N/A VerificationException N/A Exception N/A N/A This exception is thrown whenever there was an error with an
    authenticity check performed by any of the decorators in this module. N/A N/A HMACDecorator N/A StoreDecorator N/A N/A HMAC authentication and integrity check decorator.

    This decorator overrides the :meth:`.KeyValueStore.get`,
    :meth:`.KeyValueStore.get_file`, :meth:`.KeyValueStore.open`,
    :meth:`.KeyValueStore.put` and :meth:`.KeyValueStore.put_file` methods and
    alters the data that is store in the follow way:

    First, the original data is stored while being fed to an hmac instance. The
    resulting hash is appended to the data as a binary string, every value
    stored therefore takes up an additional ``hmac_digestsize`` bytes.

    Upon retrieval using any of :meth:`.KeyValueStore.get`,
    :meth:`.KeyValueStore.get_file` or :meth:`.KeyValueStore.open` methods, the
    data is checked as soon as the hash is readable. Since hashes are stored at
    the end, almost no extra memory is used when using streaming methods.
    However, :meth:`.KeyValueStore.get_file` and :meth:`.KeyValueStore.open`
    will only check the hash value once it is read, that is, at the end of the
    retrieval.

    The decorator will protect against any modification of the stored data and
    ensures that only those with knowledge of the ``__secret_key``
    can alter any data. The key used to store data is also used to extend the
    HMAC secret key, making it impossible to copy a valid message over to a
    different key.
     __init__ N/A N/A self secret_key decorated_store hashfunc N/A N/A hashlib sha256 N/A N/A N/A N/A N/A super HMACDecorator self __init__ decorated_store N/A N/A self __hashfunc hashfunc N/A N/A self __secret_key N/A bytes secret_key N/A hmac_digestsize N/A N/A self N/A N/A N/A N/A N/A N/A self hmac_mixin_hashfunc digestsize N/A property __new_hmac N/A N/A self key msg N/A None N/A N/A N/A msg N/A N/A msg N/A hm N/A N/A hmac HMAC key N/A N/A N/A key encode ascii N/A self __secret_key msg msg digestmod N/A self __hashfunc N/A hm N/A get N/A N/A self key N/A N/A N/A buf N/A N/A N/A self _dstore get key N/A hm N/A N/A self __new_hmac key N/A hash N/A buf N/A N/A N/A hm digest_size N/A buf N/A buf N/A N/A N/A hm digest_size N/A N/A N/A hm update buf N/A N/A N/A N/A N/A hm digest hash N/A N/A N/A VerificationException N/A Invalid hash on key %r key N/A buf N/A get_file N/A N/A self key file N/A N/A N/A N/A isinstance file str N/A N/A N/A N/A f N/A open file wb N/A N/A N/A OSError N/A e N/A N/A N/A IOError N/A Error opening %s for writing: %r N/A file e N/A N/A N/A N/A N/A self get_file key f N/A N/A N/A N/A f close N/A N/A source N/A N/A self open key N/A bufsize N/A 1024 1024 N/A True N/A N/A buf N/A N/A source read bufsize N/A N/A N/A file write buf N/A N/A N/A len buf bufsize N/A N/A N/A open N/A N/A self key N/A N/A N/A source N/A N/A N/A self _dstore open key N/A N/A _HMACFileReader N/A N/A self __new_hmac key source N/A put N/A N/A self key value N/A args kwargs N/A N/A data N/A value N/A N/A N/A N/A self __new_hmac key value digest N/A N/A N/A N/A self _dstore put key data args kwargs N/A put_file N/A N/A self key file N/A args kwargs N/A N/A hm N/A N/A self __new_hmac key N/A bufsize N/A 1024 1024 N/A N/A isinstance file str N/A N/A N/A open file rb+ source N/A N/A True N/A N/A buf N/A N/A source read bufsize N/A N/A N/A hm update buf N/A N/A N/A len buf bufsize N/A N/A N/A N/A N/A source write N/A N/A hm digest N/A N/A N/A N/A self _dstore put_file key file args kwargs N/A N/A tmpfile N/A N/A tempfile NamedTemporaryFile delete False N/A N/A N/A True N/A N/A buf N/A N/A file read bufsize N/A N/A N/A hm update buf N/A N/A N/A tmpfile write buf N/A N/A N/A len buf bufsize N/A N/A N/A N/A N/A tmpfile write N/A N/A hm digest N/A N/A N/A tmpfile close N/A N/A N/A N/A self _dstore put_file key N/A tmpfile name args kwargs N/A N/A N/A N/A os unlink N/A tmpfile name N/A N/A