lithium\security\validation\FormSignature::_parse()

protected static method

Parses form signature string.

Note: The parsed signature is not returned as it's not needed. The signature is verified by re-compiling the form signature string with the retrieved signature.

Parameters

  • string $string

Returns

array

Source

	protected static function _parse($string) {
		if (substr_count($string, '::') !== 2) {
			throw new Exception('Possible data tampering: form signature string has wrong format.');
		}
		list($locked, $excluded) = explode('::', $string, 3);

		return array(
			'locked' => unserialize(urldecode($locked)),
			'excluded' => unserialize(urldecode($excluded))
		);
	}