- Home /
How might I check integrity of C# assembly or prevent substitution?
Using a windows player (or web), what might be a good way to verify that my C# assemblies haven't been modified or replaced? Have any of you done a similar sanity check when the application starts?
Not so much about protecting the actual assemblies, but related to security: http://docs.unity3d.com/Documentation/ScriptReference/Application-srcValue.html
Answer by Dave-Carlile · Oct 30, 2012 at 05:27 PM
An MD5 or SHA checksum seems to be a common standard. You would calculate the checksum after compiling your libraries. When running, recalculate and compare to the expected value.
http://www.bing.com/search?q=sha+checksum&qs=n&form=QBLH&pq=sha+checksum&sc=3-12&sp=-1&sk=
I may not have been clear. I'm looking for a good tactic to check this when the unity application starts up. Are you suggesting I include some C# script with the expected values to checksum the files in the $$anonymous$$anaged folder?
If you're wanting to verify that the dlls haven't been modified, then yes. But maybe I'm not understanding what you're asking.
Your answer
Follow this Question
Related Questions
Load assemblies at runtime on 64 bit Android 2 Answers
'EventSystems' does not exist in the namespace 'UnityEngine'... 1 Answer
Re-compile C# assemblies 1 Answer
namespace support in unity 1 Answer
Accessing Google APIs in Unity 1 Answer