lib/HalModuleParser.js
function(fileBuffer) {
		if (!fileBuffer || (fileBuffer.length === 0)) {
			//console.log('validateCRC: buffer was empty!');
			return false;
		}

		var dataRegion = fileBuffer.slice(0, fileBuffer.length - 4);
		var storedCrcValue = fileBuffer.slice(fileBuffer.length - 4, fileBuffer.length);

		var crcResult = crc32(dataRegion);
		var matching = utilities.bufferCompare(storedCrcValue, crcResult);
		//var matching = Buffer.compare(storedCrcValue, crcResult);

		var result = {
			//ok: (matching === 0),
			ok: matching,
			storedCrc: storedCrcValue.toString('hex'),
			actualCrc: crcResult.toString('hex')
		};

		//console.log('calculated crc was ' + result.actualCrc);

		return when.resolve(result);
	}
function(fileBuffer) {
		if (!fileBuffer || (fileBuffer.length === 0)) {
			//console.log('validateCRC: buffer was empty!');
			return false;
		}

		var dataRegion = fileBuffer.slice(0, fileBuffer.length - 4);
		var storedCrcValue = fileBuffer.slice(fileBuffer.length - 4, fileBuffer.length);

		var crcResult = crc32(dataRegion);
		var matching = utilities.bufferCompare(storedCrcValue, crcResult);
		//var matching = Buffer.compare(storedCrcValue, crcResult);

		var result = {
			//ok: (matching === 0),
			ok: matching,
			storedCrc: storedCrcValue.toString('hex'),
			actualCrc: crcResult.toString('hex')
		};

		//console.log('calculated crc was ' + result.actualCrc);

		return when.resolve(result);
	}
/*
calculates the CRC of the buffer, and compares it to the
stored CRC region of the file
@param Object fileBuffer
@returns Boolean
@private