I have a C#.NET application running on a machine. How do I calculate the checksum of the entire code at runtime?
Note:
I do not want to calculate the checksum of the image in use but the actual code part.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have never used this, but:
Using reflection you can navigate to the GetILAsByteArray and do a checksum (per method).
But I think it will be a lot easier to use code signing or the Assembly.GetExecutingAssembly and then do a checksum on the .dll or .exe.