[PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

Hans Leidekker hans at codeweavers.com
Wed Aug 18 05:22:53 CDT 2010


On Wed, 2010-08-18 at 20:02 +1000, Austin Lund wrote:

> On 18 August 2010 18:34, Hans Leidekker <hans at codeweavers.com> wrote:
> > On Wed, 2010-08-18 at 10:14 +1000, Austin Lund wrote:
> >
> >>  #define MAGIC_CRYPTPROV 0xA39E741F
> >> +#define MAGIC_CRYPTKEY 0xA39E741F
> >> +#define MAGIC_CRYPTHASH 0xA39E741F
> >
> > The app might pass a crypto handle of the wrong type, so it would be
> > better to use different magic values.
> >
> 
> Are there any rules to these magic values?  Why was 0xA39E741F chosen?

They are often built from four character ascii strings to help find out
where the structures come from. I don't know why this one was chosen
but I guess you could use something like 0xA39E741E and 0xA39E741D.





More information about the wine-devel mailing list