File size: 598 Bytes
ea6d989
3b87fd3
ea6d989
3b87fd3
ea6d989
3b87fd3
ea6d989
 
3b87fd3
ea6d989
 
 
 
 
 
 
 
3b87fd3
 
ea6d989
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import time 
import nycklar.nodes as nodes
from cryptography.fernet import Fernet

def do(desencriptable):

    print("El tipo de desencriptable desde adentro es es del tipo: ", type(desencriptable))
    time.sleep(8)

    #key = Fernet.generate_key()
    key = nodes.key
    print("Esto es la KEY: ", key)
    time.sleep(1)
    fernet = Fernet(key)
    print("Esto es Fernet: ", fernet)
    
    string_desencriptado = fernet.decrypt(desencriptable).decode("utf-8")

    print(f"String desencriptado: {string_desencriptado}")
    time.sleep(5)

    return string_desencriptado