Spaces:
Sleeping
Sleeping
Moibe
commited on
Commit
·
173e96c
1
Parent(s):
3b87fd3
Fix compiler
Browse files- compiler.py +2 -2
compiler.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
from cryptography.fernet import Fernet
|
2 |
import nycklar.nodes as nodes
|
3 |
|
4 |
-
def do():
|
5 |
|
6 |
key = Fernet.generate_key()
|
7 |
fernet = Fernet(key)
|
8 |
|
9 |
string_original = "oldball182ls"
|
10 |
string_encriptado = fernet.encrypt(string_original.encode("utf-8"))
|
11 |
-
string_desencriptado = fernet.decrypt(
|
12 |
|
13 |
print(f"String original: {string_original}")
|
14 |
print(f"String encriptado: {string_encriptado}")
|
|
|
1 |
from cryptography.fernet import Fernet
|
2 |
import nycklar.nodes as nodes
|
3 |
|
4 |
+
def do(userfile):
|
5 |
|
6 |
key = Fernet.generate_key()
|
7 |
fernet = Fernet(key)
|
8 |
|
9 |
string_original = "oldball182ls"
|
10 |
string_encriptado = fernet.encrypt(string_original.encode("utf-8"))
|
11 |
+
string_desencriptado = fernet.decrypt(userfile).decode("utf-8")
|
12 |
|
13 |
print(f"String original: {string_original}")
|
14 |
print(f"String encriptado: {string_encriptado}")
|