Updating old projects causing errors

So I have a older unity project (unity version 4.6.9)which I need to update to at-least unity version 2017.4 . So I am doing it gradually first I upgraded to Unity 4.7.2. It is running smoothly in editor. However when I upgraded it to Unity version 5.6.7f1 I am getting this error :

CryptographicException: Key is too small (37 bytes), it should be 16, 24 or 32 bytes long.
System.Security.Cryptography.RijndaelTransform..ctor (System.Security.Cryptography.Rijndael algo, Boolean encryption, System.Byte[] key, System.Byte[] iv) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs:108)
System.Security.Cryptography.RijndaelManagedTransform..ctor (System.Security.Cryptography.Rijndael algo, Boolean encryption, System.Byte[] key, System.Byte[] iv) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs:48)
System.Security.Cryptography.RijndaelManaged.CreateDecryptor (System.Byte[] rgbKey, System.Byte[] rgbIV) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs:69)
<Module>..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for <Module>
LevelLoader+<LoadLevelWarpGateInstant>c__Iterator1.MoveNext () (at Assets/!Scripts/LevelLoader/LevelLoader.cs:230)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LevelLoader:MPWarpInstant(Int32, Int32, Boolean) (at Assets/!Scripts/LevelLoader/LevelLoader.cs:328)
LevelLoader:WarpInstant(Levels, Boolean) (at Assets/!Scripts/LevelLoader/LevelLoader.cs:59)
Initializer:LoadLevel() (at Assets/!Scripts/LevelLoader/Initializer.cs:85)
<HandleLoading>c__Iterator2:MoveNext() (at Assets/!Scripts/LevelLoader/Initializer.cs:80)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr

Can anyone tell me what might be causing this exact problem.?
TIA.

What’s happening on line 230 of LevelLoader.cs?

Nothing . There is a static boolean assignment like:
m_IsWarping = true;

These lines in logs has nothing to do with cryptography. So I am not able to get the cause of error.

Do you have a class named “Module”?

The error message claims that the error is happening in the constructor for a type. Those run whenever a type is first accessed in any way, and it can be a bit tricky to tell when that happens. “Module” is a kinda strange name, though, so I’m wondering if it’s a built in thing.

A cryptography error when loading a type isn’t something I’ve seen before, but a wild guess is that the type that’s getting loaded is from a dll that’s signed somehow.

1 Like