
    Vwg(                         U d dl Z d dlmZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 dedefd	Zd
edefdZdefdZd
edefdZdedefdZdedefdZ e
ee      Zeed<   y)    N)timegm)datetimetimezone)Callable)settings)lazypasswordreturnc                     t        j                  | j                               j                         j	                         S )z0
    Returns MD5 hash of the given password
    )hashlibmd5encode	hexdigestupper)r	   s    U/var/www/horilla/myenv/lib/python3.12/site-packages/rest_framework_simplejwt/utils.pyget_md5_hash_passwordr   
   s,     ;;x()335;;==    dtc                 ~    t         j                  r,| j                   | j                  t        j
                        S | S )Ntzinfo)r   USE_TZr   replacer   utcr   s    r   make_utcr      s,    299,zzz..Ir   c                      t        j                  t        j                        } t        j
                  s| j                  d       } | S N)tzr   )r   nowr   r   r   r   r   r   s    r   aware_utcnowr!      s0    		&B??ZZtZ$Ir   c                 4    t        | j                               S N)r   utctimetupler   s    r   datetime_to_epochr%       s    "//#$$r   tsc                     t        j                  | t        j                        }t        j
                  s|j                  d       }|S r   )r   fromtimestampr   r   r   r   r   )r&   r   s     r   datetime_from_epochr)   $   s4    			x||	4B??ZZtZ$Ir   sc                 &     | j                   |i |S r#   )format)r*   argskwargss      r   format_lazyr/   ,   s    188T$V$$r   r/   )r   calendarr   r   r   typingr   django.confr   django.utils.functionalr   strr   r   r!   intr%   floatr)   r/   __annotations__ r   r   <module>r9      s      '    (>C >C > h h %( %s %E h %3 %C % [#.X .r   