From f51946ac7882671a0e324e6dc898fce4f883b48b Mon Sep 17 00:00:00 2001 From: brulijam Date: Sat, 8 Jun 2024 20:44:29 +0200 Subject: [PATCH] . --- src/brulijam/systemlock.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/brulijam/systemlock.lua b/src/brulijam/systemlock.lua index 7584be5..7c517de 100644 --- a/src/brulijam/systemlock.lua +++ b/src/brulijam/systemlock.lua @@ -8,6 +8,13 @@ local function setConfig() basic.writeToFile("/brulijam/config/systemlock.config", textutils.serialize(config)) end +local function createPwHash() + write("Create a new password : ") + local input = read("*") + pwHash = hash.digestStr(input .. os.getComputerID()) + return pwHash +end + local function getConfig() if not fs.exists "/brulijam/config/systemlock.config" then config["locked"] = true @@ -21,12 +28,6 @@ local function getConfig() return config end -local function createPwHash() - write("Create a new password : ") - local input = read("*") - pwHash = hash.digestStr(input .. os.getComputerID()) - return pwHash -end local function inputTimeout() sleep(10)