*/
const PACKAGE_MASK_SEPERATOR = ':';
+ /**
+ * Seperator for checksum
+ */
+ const PACKAGE_CHECKSUM_SEPERATOR = ':';
+
/**
* Array indexes for above mask, start with zero
*/
* @param $helperInstance An instance of a BaseHubHelper class
* @param $nodeInstance An instance of a NodeHelper class
* @return $hash Hash for given package content
+ * @todo $helperInstance is unused
*/
private function getHashFromContent ($content, BaseHubHelper $helperInstance, NodeHelper $nodeInstance) {
// Create the hash
- // @TODO crc32 is not good, but it needs to be fast
+ // @TODO crc32 is not very strong, but it needs to be fast
$hash = crc32(
$content .
- ':' .
+ self::PACKAGE_CHECKSUM_SEPERATOR .
$nodeInstance->getSessionId() .
- ':' .
+ self::PACKAGE_CHECKSUM_SEPERATOR .
$this->getCompressorInstance()->getCompressorExtension()
);