internal bool IsSessionKey(string msg) { try { string decryptedMessage = RSAModule.DecryptStringToString(msg); string[] segments = decryptedMessage.Split(':'); if (ServerCore.DebugMode) { Console.WriteLine ("Session Key Received From Client [{1}]", decryptedMessage, ClientId); } InitializeAesModule(segments[0], segments[1]); return(true); } catch (Exception e) { Console.WriteLine("[Error]: Unable To Handle Session Key!"); Console.WriteLine(e.ToString()); DisposeOfClientAndConnection(); return(false); } }
internal static void InitializeMySqlPasswordFromEncrypted() { try { string decryptedPassword = RSAModule.DecryptStringToString(password); Console.WriteLine("Mysql Database Password Decrypted.."); connectionData = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD="******";"; } catch (Exception e) { Console.WriteLine(e.ToString()); } }