Spaces:
Building
Building
Create encrypt_token.py
Browse files- encrypt_token.py +14 -0
encrypt_token.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
CLI: python encrypt_token.py <PLAIN_TOKEN>
|
3 |
+
Çıktıyı service_config.jsonc içindeki cloud_token alanına yapıştır.
|
4 |
+
"""
|
5 |
+
|
6 |
+
import sys, os
|
7 |
+
from encryption_utils import encrypt
|
8 |
+
|
9 |
+
if len(sys.argv) < 2:
|
10 |
+
print("Usage: python encrypt_token.py <plain_token>")
|
11 |
+
sys.exit(1)
|
12 |
+
|
13 |
+
plain = sys.argv[1]
|
14 |
+
print(encrypt(plain))
|