@@ -147,6 +147,7 @@ internal set
147147 /// </summary>
148148 public event CustomMessageDelegete OnIncommingCustomMessage ;
149149 public string ConnectedHostname { get ; private set ; }
150+ internal byte [ ] clientAesKey ;
150151 internal static event Action OnSingletonReady ;
151152
152153 internal void InvokeOnIncommingCustomMessage ( uint clientId , Stream stream )
@@ -194,13 +195,6 @@ public void SendCustomMessage(uint clientId, Stream stream, string channel = "ML
194195 InternalMessageHandler . Send ( clientId , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , channel , stream , SecuritySendFlags . None ) ;
195196 }
196197
197- internal byte [ ] clientAesKey ;
198-
199- /// <summary>
200- /// An inspector bool that acts as a Trigger for regenerating RSA keys. Should not be used outside Unity editor.
201- /// </summary>
202- public bool RegenerateRSAKeys = false ;
203-
204198 private void OnValidate ( )
205199 {
206200 if ( NetworkConfig == null )
@@ -244,30 +238,7 @@ private void OnValidate()
244238 if ( LogHelper . CurrentLogLevel <= LogLevel . Normal ) LogHelper . LogWarning ( "Only one networked prefab can be marked as a player prefab" ) ;
245239 }
246240 else NetworkConfig . PlayerPrefabName = NetworkConfig . NetworkedPrefabs . Find ( x => x . playerPrefab == true ) . name ;
247-
248- }
249-
250- /*
251- if (!NetworkConfig.EnableEncryption)
252- {
253- RegenerateRSAKeys = false;
254- }
255- else
256- {
257- if (RegenerateRSAKeys)
258- {
259- #if !DISABLE_CRYPTOGRAPHY
260- using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
261- {
262- rsa.PersistKeyInCsp = false;
263- NetworkConfig.RSAPrivateKey = rsa.ToXmlString(true);
264- NetworkConfig.RSAPublicKey = rsa.ToXmlString(false);
265- }
266- #endif
267- RegenerateRSAKeys = false;
268- }
269241 }
270- */
271242 }
272243
273244 private object Init ( bool server )
0 commit comments