V4.7
This commit is contained in:
@@ -11,20 +11,22 @@ namespace AiQ_GUI
|
||||
const string SAFsalt = "F7W?wbD#'[+:v44]tA<:_iK4hQ}+$R{U";
|
||||
const string Streamsalt = "*;5WPsR5i/$8s1I(M)K5=z3fms{_8x4U";
|
||||
const string Auditsalt = "4t5e[E06:dXWf:C09Z[h)}V*n>}t0POP";
|
||||
const string XMLsalt = "ap(r]oN?t V@WvI=IX=[+$n(<5J,&Ygd";
|
||||
const string PasswordSalt = "eP@4^4T2@e@^h12oqf!590";
|
||||
|
||||
// Generates the license response based on the challenge and type of license
|
||||
public static string GenerateLicCode(string challenge, string Type)
|
||||
{
|
||||
string salt; // Different salts for differnet licenses
|
||||
string? salt = Type switch
|
||||
{
|
||||
"Store & Forward" => SAFsalt,
|
||||
"Streaming" => Streamsalt,
|
||||
"Audit" => Auditsalt,
|
||||
"XML Server" => XMLsalt,
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (Type == "Store & Forward")
|
||||
salt = SAFsalt;
|
||||
else if (Type == "Streaming")
|
||||
salt = Streamsalt;
|
||||
else if (Type == "Audit")
|
||||
salt = Auditsalt;
|
||||
else
|
||||
if (salt == null)
|
||||
return $"Unrecognised challenge type:{Level.ERROR}" + Type;
|
||||
|
||||
if (string.IsNullOrEmpty(challenge) || challenge.Length != 6) // Check challenge format
|
||||
|
||||
Reference in New Issue
Block a user