C++ common classes
General purpose classes for use across projects (Apache license)
|
#include <CheckMemSignature.h>
Public Member Functions | |
CheckMemSignature (bool bMemLog=true) | |
virtual | ~CheckMemSignature () |
bool | GetResult () |
Return the result of the hardware check. | |
unsigned char * | GetMD5Hash (unsigned char *pBuffer, int iBufLen) |
Get an MD5 hash. | |
const char * | DisplayKey () |
Get the hardware key. | |
const char * | GetSerialNumber () |
Get serial number. | |
Public Attributes | |
unsigned char | ucHardwareKey [HASH_LENGTH] |
Protected Member Functions | |
int | ReadPhysicalMem (int iOffset, int iSize, unsigned char *pBuffer) |
Read physical memory. | |
unsigned char * | GetHardwareKey () |
Get a hardware specific key. | |
unsigned int | ConvertHexByte (const char *pHex) |
Convert hex byte string to unsigned char. | |
const char * | GetIPv6MacAddr (const char *strIfName) |
Given the interface name (ex; "eth0") get the IPv6 MAC address. | |
Protected Attributes | |
unsigned char | md_value [EVP_MAX_MD_SIZE] |
string | ipv6mac |
string | sSerialNo |
This class must be changed for each type of hardware a program is going to be run on. Given a physical memory location (usually in the BIOS) it will check that we are on the proper HW.
Definition at line 44 of file CheckMemSignature.h.
CheckMemSignature::CheckMemSignature | ( | bool | bMemLog = true | ) |
Definition at line 13 of file CheckMemSignature.cpp.
CheckMemSignature::~CheckMemSignature | ( | ) | [virtual] |
Definition at line 24 of file CheckMemSignature.cpp.
unsigned int CheckMemSignature::ConvertHexByte | ( | const char * | pHex | ) | [protected] |
Convert hex byte string to unsigned char.
Definition at line 253 of file CheckMemSignature.cpp.
const char * CheckMemSignature::DisplayKey | ( | ) |
Get the hardware key.
Definition at line 180 of file CheckMemSignature.cpp.
unsigned char * CheckMemSignature::GetHardwareKey | ( | ) | [protected] |
Get a hardware specific key.
Definition at line 147 of file CheckMemSignature.cpp.
const char * CheckMemSignature::GetIPv6MacAddr | ( | const char * | strIfName | ) | [protected] |
Given the interface name (ex; "eth0") get the IPv6 MAC address.
Definition at line 265 of file CheckMemSignature.cpp.
unsigned char * CheckMemSignature::GetMD5Hash | ( | unsigned char * | pBuffer, |
int | iBufLen | ||
) |
Get an MD5 hash.
Definition at line 86 of file CheckMemSignature.cpp.
bool CheckMemSignature::GetResult | ( | ) |
Return the result of the hardware check.
Definition at line 28 of file CheckMemSignature.cpp.
const char * CheckMemSignature::GetSerialNumber | ( | ) |
Get serial number.
Definition at line 197 of file CheckMemSignature.cpp.
int CheckMemSignature::ReadPhysicalMem | ( | int | iOffset, |
int | iSize, | ||
unsigned char * | pBuffer | ||
) | [protected] |
Read physical memory.
Definition at line 116 of file CheckMemSignature.cpp.
string CheckMemSignature::ipv6mac [protected] |
Definition at line 75 of file CheckMemSignature.h.
unsigned char CheckMemSignature::md_value[EVP_MAX_MD_SIZE] [protected] |
Definition at line 74 of file CheckMemSignature.h.
string CheckMemSignature::sSerialNo [protected] |
Definition at line 76 of file CheckMemSignature.h.
unsigned char CheckMemSignature::ucHardwareKey[HASH_LENGTH] |
Definition at line 71 of file CheckMemSignature.h.