need clarification on manifest entry...

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
 
G

Gabriele G. Ponti

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top