// encryption was not used, so we need to check the md5 hash
// Does the md5 hash match? This is to prevent manipulation of session data in userspace
if ($hash !== md5($session.$this->encryption_key))
$this->userdata = array(
'session_id' => md5(uniqid($sessid, TRUE)),
// Turn it into a hash
$new_sessid = md5(uniqid($new_sessid, TRUE));
// if encryption is not used, we provide an md5 hash to prevent userside tampering
$cookie_data = $cookie_data.md5($cookie_data.$this->encryption_key);
// Internally, we need to treat identical submissions, but with different options, as a unique product.
// Our solution is to convert the options array to a string and MD5 it along with the product ID.
$rowid = md5($items['id'].implode('', $items['options']));
// No options were submitted so we simply MD5 the product ID.
// Technically, we don't need to MD5 the ID in this case, but it makes
// sense to standardize the format of array indexes for both conditions
$rowid = md5($items['id']);