src/mako/security/Signer.php
public function validate(string $string)
	{
		$validated = mb_substr($string, static::MAC_LENGTH, null, '8bit');

		if(hash_equals($this->getSignature($validated), mb_substr($string, 0, static::MAC_LENGTH, '8bit')))
		{
			return $validated;
		}

		return false;
	}
public function validate(string $string)
	{
		$validated = mb_substr($string, static::MAC_LENGTH, null, '8bit');

		if(hash_equals($this->getSignature($validated), mb_substr($string, 0, static::MAC_LENGTH, '8bit')))
		{
			return $validated;
		}

		return false;
	}
public function validate ( string $ string ) { $ validated = mb_substr ( $ string , static :: MAC_LENGTH , null , '8bit' ) ; if ( hash_equals ( $ this -> getSignature ( $ validated ) , mb_substr ( $ string , 0 , static :: MAC_LENGTH , '8bit' ) ) ) { return $ validated ; } return false ; }
Returns the original string if the signature is valid or FALSE if not.

@param  string      $string The string you want to validate
@return string|bool
Returns the original string if the signature is valid or FALSE if not .