Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenhivesum.c
Go to the documentation of this file.
00001 /* 00002 * PROJECT: registry manipulation library 00003 * LICENSE: GPL - See COPYING in the top level directory 00004 * COPYRIGHT: Copyright 2005 Filip Navara <navaraf@reactos.org> 00005 * Copyright 2001 - 2005 Eric Kohl 00006 */ 00007 00008 #include "cmlib.h" 00009 00016 ULONG CMAPI 00017 HvpHiveHeaderChecksum( 00018 PHBASE_BLOCK HiveHeader) 00019 { 00020 PULONG Buffer = (PULONG)HiveHeader; 00021 ULONG Sum = 0; 00022 ULONG i; 00023 00024 for (i = 0; i < 127; i++) 00025 Sum ^= Buffer[i]; 00026 if (Sum == (ULONG)-1) 00027 Sum = (ULONG)-2; 00028 if (Sum == 0) 00029 Sum = 1; 00030 00031 return Sum; 00032 } Generated on Thu May 24 2012 04:36:24 for ReactOS by
1.7.6.1
|