mirror of
https://github.com/tcsenpai/emesh.git
synced 2025-06-03 01:00:03 +00:00
added customization options
This commit is contained in:
parent
de20dbb529
commit
32f3c8d413
@ -17,7 +17,7 @@ publicRSAKey = None
|
||||
publicRSAPEM = None
|
||||
|
||||
# INFO Common entry point to authentication
|
||||
def ensure():
|
||||
def ensure(savekeys=True):
|
||||
if(
|
||||
os.path.exists("private.key")
|
||||
):
|
||||
@ -25,9 +25,9 @@ def ensure():
|
||||
load()
|
||||
else:
|
||||
print("[ED25519] Creating ed25519 private key...")
|
||||
create()
|
||||
create(savekeys)
|
||||
|
||||
def create():
|
||||
def create(savekeys=True):
|
||||
global privateKey
|
||||
global privateBytes
|
||||
# ED25519 Creation
|
||||
@ -45,7 +45,8 @@ def create():
|
||||
# RSA Creation
|
||||
derive()
|
||||
# Writing file
|
||||
save()
|
||||
if savekeys:
|
||||
save()
|
||||
|
||||
def load(filepath="./"):
|
||||
global privateBytes
|
||||
|
2
term.py
2
term.py
@ -59,7 +59,6 @@ def main():
|
||||
print("[MAIN CYCLE] Starting watchdog...")
|
||||
was_connected = False
|
||||
cooldownHeader = False
|
||||
loading.start("[ eMesh Main Cycle is Running ")
|
||||
while not ((os.getenv("FORCE_QUIT") == "True") or forceQuit):
|
||||
# This is just a way to check if we need to notify the gui
|
||||
are_connected = emesh.connected
|
||||
@ -104,7 +103,6 @@ def main():
|
||||
# print("[MAIN CYCLE] Sleeping complete. Proceeding to the next cycle...")
|
||||
print("[MAIN CYCLE] Exiting main cycle...")
|
||||
print("[SYSTEM] Exiting...")
|
||||
loading.stop()
|
||||
|
||||
print("[SYSTEM] Ready to start.")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user