I want to convert a function of a windev program to C# .net core 6 web api project controller function.
Example code:
sLic is string ANSI = sAPPLICENSEID+";"+SAI_License_Number;
sRes is string ANSI;
sLic = License_Crypt_String(sLic);
sRes = License_Check(sLic);
IF sRes="E100" OR sRes = "E101" OR sRes="E102" OR sRes="E103" THEN
gstLicense.bIsValid=False;
Info("Erreur "+sRes);
ELSE
sRes = Replace(sRes,CR,"");
gstLicense = License_Decrypt(sRes);
SAI_License_Owner = gstLicense.sOwner;
SAI_LimitDate = gstLicense.dLimit;
SAI_NumberOfUsers = gstLicense.nNumberOfUsers;
INIWrite("<LS>","<info>",sRes,fDataDirUser()+"\login.ini");
Database_Change_Connexion();
IF NOT InTestMode THEN
Check_DB();
END
// Info("Success : description = "+gstLicense.sDescription);
END
Finally I was able to convert the code.
and encryption code as below
Hope this will help someone in future