Sindbad~EG File Manager

Current Path : /home/numerotech/hs.numerotech.com/scan_v1/core/library/__pycache__/
Upload File :
Current File : //home/numerotech/hs.numerotech.com/scan_v1/core/library/__pycache__/cryptography.cpython-310.pyc

o

�
�e8�@s ddlmZ	Gdd�d�ZdS)�)�Fernetc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�CryptographycCsBt��}tdd��}|�|�Wd�dS1swYdS)z3
	    Generates a key and save it into a file
	    �
secret.key�wbN)r�generate_key�open�write)�key�key_file�r�G/home/numerotech/hs.numerotech.com/scan_v1/core/library/cryptography.pyr
s"�zCryptography.generate_keycCstdd���S)zH
	    Loads the key named `secret.key` from the current directory.
	    r�rb)r�readrrrr�load_keyszCryptography.load_keycCs0t��}t|��d�}t|�}|�|�}|��S)z
	    Encrypts a message
	    �utf-8)rr�repr�encoder�encrypt�decode)�valuer	Z
encoded_value�f�encrypted_valuerrrrs

zCryptography.encryptcCs(t��}t|�}|�t|d��}|��S)z)
	    Decrypts an encrypted message
	    r)rrr�decrypt�bytesr)rr	rZdecrypted_valuerrrr(szCryptography.decryptN)�__name__�
__module__�__qualname__rrrrrrrrrs
rN)Zcryptography.fernetrrrrrr�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists