public ClusterClient(string _ip = "127.0.0.1", ushort _port = 6256) : base(_ip, _port) { name = "Test Name"; // TODO: Load from config. string keyName = name.Replace(" ", ""); // TODO: Replace with config name. #region RSA Loading & Generation RSAManager.LoadKey(keyName, RSAManager.KeyType.PrivateKey); // Load all private keys. // If the requested key doesn't exist, create it. if (!RSAManager.KeyExists(keyName, RSAManager.KeyType.PrivateKey)) { RSAManager.GenerateKeyPair(keyName); } #endregion #region AES Loading & Generation AESManager.LoadKey(keyName); // If the requested key doesn't exist, create it. if (!AESManager.KeyExists(keyName)) { AESManager.GenerateKey(keyName); } #endregion onConnected.Run += () => this.ValidateCluster(keyName); }