lithium\storage\session\strategy\Hmac::_signature()

protected static method

Calculate the HMAC signature based on the data and a secret key.

Parameters

  • mixed $data
  • null|string $secret

    Secret key for HMAC signature creation.

Returns

string

HMAC signature.

Source

	protected static function _signature($data, $secret = null) {
		unset($data['__signature']);
		$secret = ($secret) ?: static::$_secret;
		return hash_hmac('sha1', serialize($data), $secret);
	}