public static function validateSaltedMd5($clearString, $hashedStringAndSalt)
{
if (strpos($hashedStringAndSalt, ',') === false) {
throw new \InvalidArgumentException('The hashed string must contain a salt, separated with comma from the hashed.', 1269872776);
}
list($passwordHash, $salt) = explode(',', $hashedStringAndSalt);
return md5(md5($clearString) . $salt) === $passwordHash;
}