o
    v)i+                     @   s`   d dl mZ d dlmZ d dlmZmZ dZdZedgddZd	d
 Z	dd Z
defddZdS )    )CryptContext)jwt)datetime	timedeltayour_secret_keyHS256bcryptauto)schemes
deprecatedc                 C   s
   t | S N)pwd_contexthash)password r   0/home/esfera/Desktop/Rishu/Inhouse_Email/auth.pyhash_password
   s   
r   c                 C   s   t | |S r   )r   verify)r   hashedr   r   r   verify_password   s   r   datac                 C   s0   t  tdd }| d|i tj| ttdS )N   )hoursexp)	algorithm)r   utcnowr   updater   encode
SECRET_KEY	ALGORITHM)r   expirer   r   r   create_token   s   r!   N)passlib.contextr   joser   r   r   r   r   r   r   r   dictr!   r   r   r   r   <module>   s    