ReactOS  0.4.13-dev-1148-g9b75b67
hivesum.c File Reference
#include "cmlib.h"
Include dependency graph for hivesum.c:

Go to the source code of this file.

Functions

HvpHiveHeaderChecksum

Compute checksum of hive header and return it.

ULONG CMAPI HvpHiveHeaderChecksum (PHBASE_BLOCK HiveHeader)
 

Function Documentation

◆ HvpHiveHeaderChecksum()

ULONG CMAPI HvpHiveHeaderChecksum ( PHBASE_BLOCK  HiveHeader)

Definition at line 17 of file hivesum.c.

19 {
20  PULONG Buffer = (PULONG)HiveHeader;
21  ULONG Sum = 0;
22  ULONG i;
23 
24  for (i = 0; i < 127; i++)
25  Sum ^= Buffer[i];
26  if (Sum == (ULONG)-1)
27  Sum = (ULONG)-2;
28  if (Sum == 0)
29  Sum = 1;
30 
31  return Sum;
32 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: bufpool.h:45
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1

Referenced by CmCreateRootNode(), HvIsInPlaceBaseBlockValid(), HvpVerifyHiveHeader(), HvpWriteHive(), and HvpWriteLog().