Spaces:
Sleeping
Sleeping
Fernet generator
Browse files- generador💡.py → encrypter.py +9 -9
- generadorFernet.py +10 -0
generador💡.py → encrypter.py
RENAMED
@@ -1,10 +1,10 @@
|
|
1 |
-
import time
|
2 |
-
import nycklar.nodes as nodes
|
3 |
-
from cryptography.fernet import Fernet
|
4 |
-
|
5 |
-
key = nodes.key
|
6 |
-
fernet = Fernet(key)
|
7 |
-
|
8 |
-
string_original = "revgenlabs"
|
9 |
-
string_encriptado = fernet.encrypt(string_original.encode("utf-8"))
|
10 |
string_desencriptado = fernet.decrypt(string_encriptado).decode("utf-8")
|
|
|
1 |
+
import time
|
2 |
+
import nycklar.nodes as nodes
|
3 |
+
from cryptography.fernet import Fernet
|
4 |
+
|
5 |
+
key = nodes.key
|
6 |
+
fernet = Fernet(key)
|
7 |
+
|
8 |
+
string_original = "revgenlabs"
|
9 |
+
string_encriptado = fernet.encrypt(string_original.encode("utf-8"))
|
10 |
string_desencriptado = fernet.decrypt(string_encriptado).decode("utf-8")
|
generadorFernet.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from cryptography.fernet import Fernet
|
2 |
+
|
3 |
+
#Con este programa genero una llave de Fernet pero no tiene uso dentro de Sulku.
|
4 |
+
#Podría usarse la clave que ya genere previamente.
|
5 |
+
|
6 |
+
# Generate a random 32-byte key
|
7 |
+
key = Fernet.generate_key()
|
8 |
+
|
9 |
+
# Print the key in base64-encoded format
|
10 |
+
print(key.decode('utf-8'))
|