I have a need to provide a 32-bit CRC (Cyclic Redundancy Check) of all assemblies, which is stored (for release control purposes), and may then be compared against the assemblies present on a system at a later date (in order to check that the release hasn't been corrupted in some way).
I have no problem calculating the CRC of the assemblies themselves, my question is this:
Do .NET assemblies ever change? I.e. Does the actual binary content of the assembly ever change (for any reason) after it is installed on the target system? If it does, then the CRC would change also.
Note, I am referring only to assemblies that are packaged with my software, not the standard System assemblies, those are not checked.
Cheers
An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies take the form of executable (.exe) or dynamic link library (. dll) files, and are the building blocks of . NET applications.
By default, assemblies are private. A private assembly is used only by a single application, and is stored in application folder, or in a subfolder. When the . net code gets compiled it generates an assembly which is stored in bin folder.
In the Microsoft . NET framework, an assembly is a partially compiled code library for use in deployment, versioning and security. There are two types: process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. .
An assembly is a file that is automatically generated by the compiler upon successful compilation of every . NET application. It can be either a Dynamic Link Library or an executable file. It is generated only once for an application and upon each subsequent compilation the assembly gets updated.
You are re-inventing a wheel, strong naming already does this. Tampering an assembly so that it has the right CRC32 is pretty simple. Breaking a strong name is not, it is cryptographically secure.
If you don't update the assemblies (overwrite them), they will never change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With