From 6ad088e46ebb0b67e4ce4eaedd78b1490012fda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Cor=C3=A9n?= <2108U9@gmail.com> Date: Mon, 2 Apr 2018 17:19:08 +0200 Subject: [PATCH] Fixed signature issue & allocation size --- MLAPI/Data/NetworkConfig.cs | 4 ---- MLAPI/MonoBehaviours/Core/NetworkingManager.cs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/MLAPI/Data/NetworkConfig.cs b/MLAPI/Data/NetworkConfig.cs index 2b0221e..573120b 100644 --- a/MLAPI/Data/NetworkConfig.cs +++ b/MLAPI/Data/NetworkConfig.cs @@ -119,10 +119,6 @@ namespace MLAPI.Data /// Wheter or not to enable scene switching /// public bool EnableSceneSwitching = false; - /// - /// The RSA Keysize to use - /// - public int RSAKeySize = 2048; private byte[] ConfigHash = null; /// diff --git a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs index bcaf43b..80d8a5d 100644 --- a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs +++ b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs @@ -1530,7 +1530,7 @@ namespace MLAPI.MonoBehaviours.Core { rsa.PersistKeyInCsp = false; rsa.FromXmlString(NetworkConfig.RSAPrivateKey); - publicKeySignature = rsa.SignData(publicKeySignature, new SHA512CryptoServiceProvider()); + publicKeySignature = rsa.SignData(publicKey, new SHA512CryptoServiceProvider()); } } } @@ -1555,7 +1555,7 @@ namespace MLAPI.MonoBehaviours.Core if (NetworkConfig.HandleObjectSpawning) { sizeOfStream += 4; - sizeOfStream += 14 * amountOfObjectsToSend; + sizeOfStream += 38 * amountOfObjectsToSend; } if (NetworkConfig.EnableEncryption)