From 32a4b39c04ffa8aa38dd2d7a62ef8e9962b34301 Mon Sep 17 00:00:00 2001 From: brulijam Date: Sat, 8 Jun 2024 20:56:39 +0200 Subject: [PATCH] . --- src/brulijam/systemlock.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/brulijam/systemlock.lua b/src/brulijam/systemlock.lua index b632fef..9316779 100644 --- a/src/brulijam/systemlock.lua +++ b/src/brulijam/systemlock.lua @@ -9,9 +9,15 @@ local function setConfig() end local function createPwHash() - write("Create a new password : ") - local input = read("*") - pwHash = hash.digestStr(input .. os.getComputerID()) + local inputConfirmed = false + while not inputConfirmed do + write("Create a new password: ") + local input = read("*") + pwHash = hash.digestStr(input .. os.getComputerID()) + + write("Confirm new password: ") + local inputConfirmed = pwHash == hash.digestStr(read("*") .. os.getComputerID()) + end return pwHash end