Beginning of the Implementing multple cameras into the AiQ GUI

Features added:
- Onvif discoverable
- New Camera Type combo box
- Access has be changed to be more scalable and dynamic in preparation for more cameras
This commit is contained in:
2025-12-19 16:14:13 +00:00
parent 760987fa75
commit 7aba890514
18 changed files with 455 additions and 333 deletions

View File

@@ -25,13 +25,13 @@ namespace AiQ_GUI
else if (Type == "Audit")
salt = Auditsalt;
else
return $"Unrecognised challenge type:{Level.ERROR}" + Type;
return $"Unrecognised challenge type:" + Type;
if (string.IsNullOrEmpty(challenge) || challenge.Length != 6) // Check challenge format
return $"Invalid challenge format. Challenge must be 6 characters.{Level.ERROR}";
return $"Invalid challenge format. Challenge must be 6 characters.";
if (string.IsNullOrEmpty(salt) || salt.Length != 32) // Check salt format
return $"Invalid salt format. Salt must be 32 characters.{Level.ERROR}";
return $"Invalid salt format. Salt must be 32 characters.";
// Hash computation using SHA256 algorithm
byte[] inputBytes = Encoding.UTF8.GetBytes(challenge + " " + salt); // SHA hash format challenge and salt with space between
@@ -60,7 +60,7 @@ namespace AiQ_GUI
}
catch (Exception ex)
{
return $"Error: Could not generate password{Level.ERROR}" + ex.Message;
return $"Error: Could not generate password" + ex.Message;
}
}
@@ -85,7 +85,7 @@ namespace AiQ_GUI
}
catch (Exception ex)
{
MainForm.Instance.AddToActionsList($"Exception in FetchDevPassword: {Level.ERROR}" + ex.Message);
MainForm.Instance.AddToActionsList($"Exception in FetchDevPassword:" + ex.Message, Level.ERROR);
return null;
}
}