File size: 477 Bytes
ea6d989
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import time 
import nycklar.nodes as nodes
from cryptography.fernet import Fernet

key = nodes.key
print("Esto es la KEY: ", key)
time.sleep(1)
fernet = Fernet(key)
print("Esto es Fernet: ", fernet)

string_original = "revgenlabs"
string_encriptado = fernet.encrypt(string_original.encode("utf-8"))
string_desencriptado = fernet.decrypt(string_encriptado).decode("utf-8")

print("Guarda esto: ", string_encriptado)
print("Viene de aquí: ", string_desencriptado)