o
    ]f                     @   s  d Z ddlZddlZddlZddlZddlZddlZddlZddlm	Z	 ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ dd	l
mZ dd
l
mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ dZ%e&e'Z(ej)ej*ej+ej,ej-ej.gZ/G dd deZ0G dd dZ1dS )z
    flask_caching
    ~~~~~~~~~~~~~

    Adds cache support to your application.

    :copyright: (c) 2010 by Thadeus Burgess.
    :license: BSD, see LICENSE for more details.
    N)OrderedDict)Any)Callable)Dict)List)Optional)Tuple)Union)current_app)Flask)request)Response)url_for)import_string)	BaseCache)SimpleCache)function_namespace)get_arg_default)get_arg_names)get_id)make_template_fragment_key)
wants_argsz2.3.0c                   @   s   e Zd ZdZdZdd ZdS )CachedResponsez
    views wraped by @cached can return this (which inherits from flask.Response)
    to override the cache TTL dynamically
    Nc                 C   s   |j | _ || _d S N)__dict__timeout)selfresponser    r   O/home/ubuntu/webapp/venv/lib/python3.10/site-packages/flask_caching/__init__.py__init__A   s   
zCachedResponse.__init__)__name__
__module____qualname____doc__r   r    r   r   r   r   r   9   s    r   c                   @   s
  e Zd ZdZ			dOdee deddfddZdPdeddfd	d
ZdeddfddZ	dd Z
edefddZdefddZdefddZdee fddZdefddZdefddZdee fddZdefddZdd  Zdee fd!d"Zdeeef fd#d$Zdee fd%d&Zdd'dddd(ejd(ddd(fd)ee d*ed+ee  d,ee  d-ee  d.ed/e d0ed1ee  d2ee d3ee de fd4d5Z!d6edefd7d8Z"defd9d:Z#			(	(		(	dQd;e d<ee d=ed>ed)ee d,ee$ee f  d?ee de$e%eef e%edf f fd@dAZ&ddd(ejd(dfdBee  d)ee  d,ed/e d2ee d?ee de fdCdDZ'd;e defdEdFZ(d+ee  d;e defdGdHZ)dddddejd(ddf	d)ee dBee  d+ee  d,ee  d-ee  d/e d0ed2ee d?ee de fdIdJZ*dRdKdLZ+d;e ddfdMdNZ,dS )SCachez0This class is used to control the cache objects.NTappwith_jinja2_extreturnc                 C   sH   |d u st |tstd|| _|| _d | _|d ur"| || d S d S )N,`config` must be an instance of dict or None)
isinstancedict
ValueErrorr'   configsource_checkinit_app)r   r&   r'   r-   r   r   r   r    I   s   zCache.__init__c                 C   sj  |du st |tstd|j }| jr|| j |r"|| |}|dd |dd |dd |d	d
 |dd |dd |dd |dg  |dd |dd |dd |d dkrw|d swtjddd |d dv r|d du rtjd|d  ddd |d | _	| j
rddlm}m} t|j||  |j| | || dS )z5This is used to initialize cache with your app objectNr)   CACHE_DEFAULT_TIMEOUTi,  CACHE_IGNORE_ERRORSFCACHE_THRESHOLDi  CACHE_KEY_PREFIXflask_cache_CACHE_MEMCACHED_SERVERS	CACHE_DIRCACHE_OPTIONS
CACHE_ARGS
CACHE_TYPEnullCACHE_NO_NULL_WARNINGCACHE_SOURCE_CHECKzJFlask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.   )
stacklevel)
filesystemFileSystemCachez$Flask-Caching: CACHE_TYPE is set to z but no CACHE_DIR is set.   )CacheExtensionJINJA_CACHE_ATTR_NAME)r*   r+   r,   r-   copyupdate
setdefaultwarningswarnr.   r'   	jinja2extrB   rC   setattr	jinja_envadd_extension
_set_cache)r   r&   r-   base_configrB   rC   r   r   r   r/   Z   sH   


zCache.init_appc                 C   s   |d }d|vrd}d| }nd}t |}|d d d  }d|d i}t|tr1t|tr1|j}n
|r;tjd	td
d |d rF|	|d  t
|dsNi |_|jdi  ||||||jd | < || _d S )Nr9   .Tzflask_caching.backends.Fr8   default_timeoutr0   z|Using the initialization functions in flask_caching.backend is deprecated.  Use the a full path to backend classes directly.r=   )categoryr>   r7   
extensionscache)r   r*   type
issubclassr   factoryrG   rH   DeprecationWarningrE   hasattrrR   rF   r&   )r   r&   r-   	import_meplain_name_usedcache_factory
cache_argscache_optionsr   r   r   rM      s2   


zCache._set_cachec                 O   s6   t | jdd }|d ur|||i |S ||i |S )Nensure_sync)getattrr&   )r   fnargskwargsr^   r   r   r   _call_fn   s   zCache._call_fnc                 C   s   t p| j}|jd |  S )NrS   )r
   r&   rR   )r   r&   r   r   r   rS      s   
zCache.cachec                 O      | j j|i |S z)Proxy function for internal cache object.)rS   getr   ra   rb   r   r   r   rf         z	Cache.getc                 O   rd   re   )rS   hasrg   r   r   r   ri      rh   z	Cache.hasc                 O   rd   re   )rS   setrg   r   r   r   rj      rh   z	Cache.setc                 O   rd   re   )rS   addrg   r   r   r   rk      rh   z	Cache.addc                 O   rd   re   )rS   deleterg   r   r   r   rl      rh   zCache.deletec                 O   rd   re   )rS   delete_manyrg   r   r   r   rm      rh   zCache.delete_manyc                 C   s
   | j  S re   )rS   clearr   r   r   r   rn      s   
zCache.clearc                 O   rd   re   )rS   get_manyrg   r   r   r   rp      rh   zCache.get_manyc                 O   rd   re   )rS   set_manyrg   r   r   r   rq      rh   zCache.set_manyc                 O   rd   re   )rS   get_dictrg   r   r   r   rr      rh   zCache.get_dictc                 O   s<   t | jdd}|durt|r||i |S | j|i |S )zLProxy function for internal cache object
        only support Redis
        unlinkN)r_   rS   callablerm   )r   ra   rb   rs   r   r   r   rs      s   zCache.unlinkzview/%sFr   
key_prefixunlessforced_updateresponse_filterquery_stringhash_method
cache_nonemake_cache_keyr.   response_hit_indicationc                    s&    	
fdd}|S )a/  Decorator. Use this to cache a function. By default the cache key
        is `view/request.path`. You are able to use this decorator with any
        function by changing the `key_prefix`. If the token `%s` is located
        within the `key_prefix` then it will replace that with `request.path`

        Example::

            # An example view function
            @cache.cached(timeout=50)
            def big_foo():
                return big_bar_calc()

            # An example misc function to cache.
            @cache.cached(key_prefix='MyCachedList')
            def get_list():
                return [random.randrange(0, 1) for i in range(50000)]

            my_list = get_list()

        .. note::

            You MUST have a request context to actually called any functions
            that are cached.

        .. versionadded:: 0.4
            The returned decorated function now has three function attributes
            assigned to it. These attributes are readable/writable.

                **uncached**
                    The original undecorated function

                **cache_timeout**
                    The cache timeout value for this function. For a
                    custom value to take affect, this must be set before the
                    function is called.

                **make_cache_key**
                    A function used in generating the cache_key used.

                    readable and writable

        :param timeout: Default None. If set to an integer, will cache for that
                        amount of time. Unit of time is in seconds.

        :param key_prefix: Default 'view/%(request.path)s'. Beginning key to .
                           use for the cache key. `request.path` will be the
                           actual request path, or in cases where the
                           `make_cache_key`-function is called from other
                           views it will be the expected URL for the view
                           as generated by Flask's `url_for()`.

                           .. versionadded:: 0.3.4
                               Can optionally be a callable which takes
                               no arguments but returns a string that will
                               be used as the cache_key.

        :param unless: Default None. Cache will *always* execute the caching
                       facilities unless this callable is true.
                       This will bypass the caching entirely.

        :param forced_update: Default None. If this callable is true,
                              cache value will be updated regardless cache
                              is expired or not. Useful for background
                              renewal of cached functions.

        :param response_filter: Default None. If not None, the callable is
                                invoked after the cached function evaluation,
                                and is given one argument, the response
                                content. If the callable returns False, the
                                content will not be cached. Useful to prevent
                                caching of code 500 responses.

        :param query_string: Default False. When True, the cache key
                             used will be the result of hashing the
                             ordered query string parameters. This
                             avoids creating different caches for
                             the same query just because the parameters
                             were passed in a different order. See
                             _make_cache_key_query_string() for more
                             details.

        :param hash_method: Default hashlib.md5. The hash method used to
                            generate the keys for cached results.
        :param cache_none: Default False. If set to True, add a key exists
                           check when cache.get returns None. This will likely
                           lead to wrongly returned None values in concurrent
                           situations and is not recommended to use.
        :param make_cache_key: Default None. If set to a callable object,
                           it will be called to generate the cache key

        :param source_check: Default None. If None will use the value set by
                             CACHE_SOURCE_CHECK.
                             If True, include the function's source code in the
                             hash to avoid using cached values when the source
                             code has changed and the input values remain the
                             same. This ensures that the cache_key will be
                             formed with the function's source code hash in
                             addition to other parameters that may be included
                             in the formation of the key.

        :param response_hit_indication: Default False.
                             If True, it will add to response header field 'hit_cache'
                             if used cache.
        c                    sx   t 
f
dd fdd}fdddtf	fdd	 __|_S )
Nc                     s  j 
g| R i |rjg| R i |S 	d u r j	zLd ur1tr1| i |}n
j| ddi|}trTtrJ| i |n du rTd }d nj|}d |d u rksed nj| W n t	y   j
jrx td jg| R i | Y S w  rj
jrtd|  r fdd}j
jd  |  sjg| R i |}t|rdd	 |D }d u s͈|rj}t|tr|jp|}zjj|||d
 W |S  t	y   j
jr td Y |S w |S )Nuse_requestTF(Exception possibly due to cache backend.zCache used for key: c                    s    r | j d< | S )N	hit_cache)headers)r   foundr   r   apply_caching  s   
zRCache.cached.<locals>.decorator.<locals>.decorated_function.<locals>.apply_cachingc                 S      g | ]}|qS r   r   .0valr   r   r   
<listcomp>      zOCache.cached.<locals>.decorator.<locals>.decorated_function.<locals>.<listcomp>r   )_bypass_cacherc   r.   rt   r|   r   rS   rf   ri   	Exceptionr&   debuglogger	exceptioninfoafter_request_funcsappendinspectisgeneratorcache_timeoutr*   r   r   rj   )ra   rb   	cache_keyrvr   r   )
r{   decorated_functionfrw   r|   rx   r}   r   r.   rv   r   r   r   j  s~   



	z;Cache.cached.<locals>.decorator.<locals>.decorated_functionc                     sB   t j}t|| D ]\}}|||< q|dd} | ||dS )Nr~   F)r~   )r   getfullargspecra   zippop)ra   rb   argspec_argsarg_nameargr~   )_make_cache_keyr   r   r   default_make_cache_key  s
   
z?Cache.cached.<locals>.decorator.<locals>.default_make_cache_keyc                     st   t tdd tjjddD } t|  }|}r-t r-t	 }|
|d t| }tj| }|S )a  Create consistent keys for query string arguments.

                Produces the same cache key regardless of argument order, e.g.,
                both `?limit=10&offset=20` and `?offset=20&limit=10` will
                always produce the same exact cache key.

                If func is provided and is callable it will be used to hash
                the function's source code and include it in the cache key.
                This will only be done is source_check is True.
                c                 s   s    | ]}|V  qd S r   r   )r   pairr   r   r   	<genexpr>  s    zXCache.cached.<locals>.decorator.<locals>._make_cache_key_query_string.<locals>.<genexpr>T)multiutf-8)tuplesortedr   ra   itemsstrencodert   r   	getsourcerE   	hexdigestpath)args_as_sorted_tupleargs_as_bytes
cache_hashfunc_source_coder   )r   rz   r.   r   r   _make_cache_key_query_string  s   

zECache.cached.<locals>.decorator.<locals>._make_cache_key_query_stringr(   c                    s   r  S t r }ndv r%|rtj }ntjfi | }n}rCt rCt}|d}t|	 }||7 }|S )Nz%sr   )
rt   r   r   r   r!   r   r   r   r   r   )ra   rb   r~   r   r   func_source_hash)r   r   rz   ru   ry   r.   r   r   r     s   
z8Cache.cached.<locals>.decorator.<locals>._make_cache_key)	functoolswrapsr   uncachedr   r|   )r   r   r{   rw   rz   ru   r|   ry   rx   r}   r   r.   r   rv   )r   r   r   r   r   	decoratori  s    S)zCache.cached.<locals>.decoratorr   )r   r   ru   rv   rw   rx   ry   rz   r{   r|   r.   r}   r   r   r   r   cached   s   "w (zCache.cachedfuncnamec                 C   s   |d S )N_memverr   )r   r   r   r   r   	_memvname  s   zCache._memvnamec                 C   s   t t jd d dS )N   r   )base64	b64encodeuuiduuid4bytesdecodero   r   r   r   _memoize_make_version_hash  s   z Cache._memoize_make_version_hashr   ra   resetrl   args_to_ignorec	                 C   s6  t ||d\}	}
| |	}|g}|pg }d|v rd}
|
r&| |
}|| |r4| j|d  |	dfS t| jj| }d}t|rXt|rQ||pJdi |pNi n| du rXd}|d du rf| 	 |d< d}|
rv|d	 du rv| 	 |d	< d}|r|dd }| 	 g}d}|r| jj
tt|||d
 |	d|fS )zXUpdates the hash version associated with a memoized function or
        method.
        )ra   r   NFr   Tr   rA   r    )r   r   r   rS   rm   listrp   rt   r   r   rq   r+   r   join)r   r   ra   rb   r   rl   r   rw   r   fnameinstance_fnameversion_key
fetch_keysinstance_version_keyversion_data_listdirtyr   r   r   _memoize_version  sJ   



zCache._memoize_version	make_namec                    s    fdd}|S )z=Function used to create the cache_key for memoized functions.c                    s   t d}j| ||| d\}}tr|n|}t| r4j| g|R i |d i\}}n||}}| | | }	 }
|
|	d r_t| r_t| }|
|d t	|

 d d }
|
d}
|
|7 }
|
S )Nr   )ra   rb   r   rw   r   r   r      )r_   r   rt   _memoize_kwargs_to_argsrE   r   r   r   r   r   digestr   )r   ra   rb   _timeoutr   version_dataaltfnamekeyargs	keykwargsupdatedr   r   r   rw   rz   r   r   r.   r   r   r   r|   h  s>   



z5Cache._memoize_make_cache_key.<locals>.make_cache_keyr   )r   r   r   rw   rz   r.   r   r|   r   r   r   _memoize_make_cache_key]  s   'zCache._memoize_make_cache_keyc                    sJ  g }d}| dd pg   fdd| D t|}t|}t|D ]c}t||}	||  v r7d }
|d7 }nJ|dkrL|| dv rLt|d }
|d7 }n5|| |v rc|||  }
 ||  n|t|k rr|| }
|d7 }n|	r{|	}
|d7 }nd }
|d7 }||
 q#|	|t|d   t
|ttfdd| D fS )	Nr   r   c                    s   g | ]}| vr|qS r   r   )r   key)r   r   r   r     s    z1Cache._memoize_kwargs_to_args.<locals>.<listcomp>rA   )r   clsc                 3   s$    | ]\}}| v r||fV  qd S r   r   )r   kv)kw_keys_remainingr   r   r     s   " z0Cache._memoize_kwargs_to_args.<locals>.<genexpr>)r   keysr   lenranger   r   indexr   extendr   r   r   r   )r   r   ra   rb   new_argsarg_num	arg_namesargs_leniarg_defaultr   r   )r   r   r   r     s@   




zCache._memoize_kwargs_to_argsc                 O   sh   d}t |r2t|}t|jdkp|jp|j}|r+||g|R i |du r)d}|S | du r2d}|S )zDetermines whether or not to bypass the cache by calling unless().
        Supports both unless() that takes in arguments and unless()
        that doesn't.
        Fr   T)rt   r   r   r   ra   varargsvarkw)r   rv   r   ra   rb   bypass_cacheargspechas_argsr   r   r   r     s   

zCache._bypass_cachec
              
      s"    	f
dd}
|
S )a  Use this to cache the result of a function, taking its arguments
        into account in the cache key.

        Information on
        `Memoization <http://en.wikipedia.org/wiki/Memoization>`_.

        Example::

            @cache.memoize(timeout=50)
            def big_foo(a, b):
                return a + b + random.randrange(0, 1000)

        .. code-block:: pycon

            >>> big_foo(5, 2)
            753
            >>> big_foo(5, 3)
            234
            >>> big_foo(5, 2)
            753

        .. versionadded:: 0.4
            The returned decorated function now has three function attributes
            assigned to it.

                **uncached**
                    The original undecorated function. readable only

                **cache_timeout**
                    The cache timeout value for this function.
                    For a custom value to take affect, this must be
                    set before the function is called.

                    readable and writable

                **make_cache_key**
                    A function used in generating the cache_key used.

                    readable and writable


        :param timeout: Default None. If set to an integer, will cache for that
                        amount of time. Unit of time is in seconds.
        :param make_name: Default None. If set this is a function that accepts
                          a single argument, the function name, and returns a
                          new string to be used as the function name.
                          If not set then the function name is used.
        :param unless: Default None. Cache will *always* execute the caching
                       facilities unless this callable is true.
                       This will bypass the caching entirely.
        :param forced_update: Default None. If this callable is true,
                              cache value will be updated regardless cache
                              is expired or not. Useful for background
                              renewal of cached functions.
        :param response_filter: Default None. If not None, the callable is
                                invoked after the cached funtion evaluation,
                                and is given one arguement, the response
                                content. If the callable returns False, the
                                content will not be cached. Useful to prevent
                                caching of code 500 responses.
        :param hash_method: Default hashlib.md5. The hash method used to
                            generate the keys for cached results.
        :param cache_none: Default False. If set to True, add a key exists
                           check when cache.get returns None. This will likely
                           lead to wrongly returned None values in concurrent
                           situations and is not recommended to use.

        :param source_check: Default None. If None will use the value set by
                             CACHE_SOURCE_CHECK.
                             If True, include the function's source code in the
                             hash to avoid using cached values when the source
                             code has changed and the input values remain the
                             same. This ensures that the cache_key will be
                             formed with the function's source code hash in
                             addition to other parameters that may be included
                             in the formation of the key.
        :param args_to_ignore: List of arguments that will be ignored while
                               generating the cache key. Default to None.
                               This means that those arguments may change
                               without affecting the cache value that will be
                               returned.

        .. versionadded:: 0.5
            params ``make_name``, ``unless``

        .. versionadded:: 1.10
            params ``args_to_ignore``
        c              	      s\   t  	fdd  _
 _j 	d _fdd _ S )Nc                     s  j g| R i |rjg| R i |S d u r jz>jg| R i |}trFtr<| i |n du rFd }d}nj|}d}|d u r] sWd}nj|}W n t	y}   j
jrj td jg| R i | Y S w |sjg| R i |}t|rdd |D }d u s|rzjj||jd W |S  t	y   j
jr td Y |S w |S )NTFr   c                 S   r   r   r   r   r   r   r   r     r   zNCache.memoize.<locals>.memoize.<locals>.decorated_function.<locals>.<listcomp>r   )r   rc   r.   r|   rt   r   rS   rf   ri   r   r&   r   r   r   r   r   rj   r   )ra   rb   r   r   r   )r{   r   r   rw   rx   r   r.   rv   r   r   r   R  s^   

	z:Cache.memoize.<locals>.memoize.<locals>.decorated_function)r   r   rw   rz   r.   r   c                      s
     S r   )delete_memoizedr   )r   r   r   r   <lambda>  s   
 z0Cache.memoize.<locals>.memoize.<locals>.<lambda>)r   r   r   r   r   r|   r   )r   
r   r{   rw   rz   r   rx   r   r.   r   rv   )r   r   r   memoizeQ  s   AzCache.memoize.<locals>.memoizer   )r   r   r   rv   rw   rx   rz   r{   r.   r   r   r   r   r   r     s   eQzCache.memoizec                 O   sT   t |std|s|s| j|dd dS |j|jg|R i |}| j| dS )aP  Deletes the specified functions caches, based by given parameters.
        If parameters are given, only the functions that were memoized
        with them will be erased. Otherwise all versions of the caches
        will be forgotten.

        Example::

            @cache.memoize(50)
            def random_func():
                return random.randrange(1, 50)

            @cache.memoize()
            def param_func(a, b):
                return a+b+random.randrange(1, 50)

        .. code-block:: pycon

            >>> random_func()
            43
            >>> random_func()
            43
            >>> cache.delete_memoized(random_func)
            >>> random_func()
            16
            >>> param_func(1, 2)
            32
            >>> param_func(1, 2)
            32
            >>> param_func(2, 2)
            47
            >>> cache.delete_memoized(param_func, 1, 2)
            >>> param_func(1, 2)
            13
            >>> param_func(2, 2)
            47

        Delete memoized is also smart about instance methods vs class methods.

        When passing a instancemethod, it will only clear the cache related
        to that instance of that object. (object uniqueness can be overridden
        by defining the __repr__ method, such as user id).

        When passing a classmethod, it will clear all caches related across
        all instances of that class.

        Example::

            class Adder(object):
                @cache.memoize()
                def add(self, b):
                    return b + random.random()

        .. code-block:: pycon

            >>> adder1 = Adder()
            >>> adder2 = Adder()
            >>> adder1.add(3)
            3.23214234
            >>> adder2.add(3)
            3.60898509
            >>> cache.delete_memoized(adder1.add)
            >>> adder1.add(3)
            3.01348673
            >>> adder2.add(3)
            3.60898509
            >>> cache.delete_memoized(Adder.add)
            >>> adder1.add(3)
            3.53235667
            >>> adder2.add(3)
            3.72341788

        :param fname: The memoized function.
        :param \*args: A list of positional parameters used with
                       memoized function.
        :param \**kwargs: A dict of named parameters used with
                          memoized function.

        .. note::

            Flask-Caching uses inspect to order kwargs into positional args when
            the function is memoized. If you pass a function reference into
            ``fname``, Flask-Caching will be able to place the args/kwargs in
            the proper order, and delete the positional cache.

            However, if ``delete_memoized`` is just called with the name of the
            function, be sure to pass in potential arguments in the same order
            as defined in your function as args only, otherwise Flask-Caching
            will not be able to compute the same cache key and delete all
            memoized versions of it.

        .. note::

            Flask-Caching maintains an internal random version hash for
            the function. Using delete_memoized will only swap out
            the version hash, causing the memoize function to recompute
            results and put them into another key.

            This leaves any computed caches for this memoized function within
            the caching backend.

            It is recommended to use a very high timeout with memoize if using
            this function, so that when the version hash is swapped, the old
            cached results would eventually be reclaimed by the caching
            backend.
        zUDeleting messages by relative name is not supported, please use a function reference.T)r   N)rt   	TypeErrorr   r|   r   rS   rl   )r   r   ra   rb   r   r   r   r   r     s   jzCache.delete_memoizedc                 G   s"   t |std| j|dd dS )a  Delete the version hash associated with the function.

        .. warning::

            Performing this operation could leave keys behind that have
            been created with this version hash. It is up to the application
            to make sure that all keys that may have been created with this
            version hash at least have timeouts so they will not sit orphaned
            in the cache backend.
        zTDeleting messages by relative name is not supported, pleaseuse a function reference.T)rl   N)rt   r   r   )r   r   ra   r   r   r   delete_memoized_verhash  s
   zCache.delete_memoized_verhash)NTNr   )NNFFNFN)r(   N)-r!   r"   r#   r$   r   r   boolr    r/   rM   rc   propertyr   rS   r   rf   ri   rj   rk   rl   r   r   rm   rn   rp   rq   r   rr   rs   hashlibmd5intr   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r%   F   s4   
9#	

  "	

G
4E
	

 
9vr%   )2r$   r   r   r   r   loggingr   rG   collectionsr   typingr   r   r   r   r   r   r	   flaskr
   r   r   r   r   werkzeug.utilsr   flask_caching.backends.baser   "flask_caching.backends.simplecacher   flask_caching.utilsr   r   r   r   r   r   __version__	getLoggerr!   r   sha1sha224sha256sha384sha512r   SUPPORTED_HASH_FUNCTIONSr   r%   r   r   r   r   <module>   sR    


