mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
32
sdk/lib/cmlib/hivesum.c
Normal file
32
sdk/lib/cmlib/hivesum.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* PROJECT: Registry manipulation library
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* COPYRIGHT: Copyright 2005 Filip Navara <navaraf@reactos.org>
|
||||
* Copyright 2001 - 2005 Eric Kohl
|
||||
*/
|
||||
|
||||
#include "cmlib.h"
|
||||
|
||||
/**
|
||||
* @name HvpHiveHeaderChecksum
|
||||
*
|
||||
* Compute checksum of hive header and return it.
|
||||
*/
|
||||
|
||||
ULONG CMAPI
|
||||
HvpHiveHeaderChecksum(
|
||||
PHBASE_BLOCK HiveHeader)
|
||||
{
|
||||
PULONG Buffer = (PULONG)HiveHeader;
|
||||
ULONG Sum = 0;
|
||||
ULONG i;
|
||||
|
||||
for (i = 0; i < 127; i++)
|
||||
Sum ^= Buffer[i];
|
||||
if (Sum == (ULONG)-1)
|
||||
Sum = (ULONG)-2;
|
||||
if (Sum == 0)
|
||||
Sum = 1;
|
||||
|
||||
return Sum;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue