o
     e`                     @   s   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 dlmZmZ ded	efd
dZded	efddZd	efddZded	efddZded	efddZded	efddZe
eeZeed< dS )    N)timegm)datetimetimezone)Callable)settings)lazy)is_naive
make_awarepasswordreturnc                 C   s   t |    S )z0
    Returns MD5 hash of the given password
    )hashlibmd5encode	hexdigestupper)r
    r   Q/var/www/html/venv/lib/python3.10/site-packages/rest_framework_simplejwt/utils.pyget_md5_hash_password   s   r   dtc                 C   s    t jrt| rt| tjdS | S )N)r   )r   USE_TZr   r	   r   utcr   r   r   r   make_utc   s   r   c                  C   s$   t jtjd} tjs| jd d} | S N)tz)tzinfo)r   nowr   r   r   r   replacer   r   r   r   aware_utcnow   s   r   c                 C   s   t |  S N)r   utctimetupler   r   r   r   datetime_to_epoch!   s   r!   tsc                 C   s&   t j| tjd}tjs|jd d}|S r   )r   fromtimestampr   r   r   r   r   )r"   r   r   r   r   datetime_from_epoch%   s   r$   sc                 O   s   | j |i |S r   )format)r%   argskwargsr   r   r   format_lazy-   s   r)   )r   calendarr   r   r   typingr   django.confr   django.utils.functionalr   django.utils.timezoner   r	   strr   r   r   intr!   floatr$   r)   __annotations__r   r   r   r   <module>   s   
 