need clarification on manifest entry...

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi

got some question regarding some entry in manifest:

this is extracted by my sample test assembly's manifest...

..assembly test
{
// --- The following custom attribute is added automatically, do not
uncomment -------
// .custom instance void
[mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool,
//
bool) = ( 01 00 00 01 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}

does anyone knows what's the entry ".hash algorithm 0x00008004" means? the
algo used to hash the assembly? I thought it is always SHA-1? then what's
the point of specifying if it is not gonna be changed?

thanks
dan
 
does anyone knows what's the entry ".hash algorithm 0x00008004" means? the
algo used to hash the assembly?

Yes, you are right. 0x00008004 corresponds to CALG_SHA (see wincrypt.h for
the possible values)
I thought it is always SHA-1? then what's
the point of specifying if it is not gonna be changed?

According to ECMA specifications, SHA-1 is the default hash algorithm. If
you don't specify the hash algorithm the compiler would put the default for
you. If you are manually writing IL code and don't specify the hash
algorithm I don't think one would be used, but I could be wrong.

Regards,

Gabriele
 
Back
Top