core-bundle/src/Resources/contao/forms/FormCaptcha.php
protected function generateHashes($sum)
	{
		// Round the time to 30 minutes
		$time = (int) round(time() / 60 / 30);

		return array_map(
			function ($hashTime) use ($sum)
			{
				return hash_hmac('sha256', $sum . "\0" . $hashTime, System::getContainer()->getParameter('kernel.secret'));
			},
			array($time, $time - 1)
		);
	}
protected function generateHashes($sum)
	{
		// Round the time to 30 minutes
		$time = (int) round(time() / 60 / 30);

		return array_map(
			function ($hashTime) use ($sum)
			{
				return hash_hmac('sha256', $sum . "\0" . $hashTime, System::getContainer()->getParameter('kernel.secret'));
			},
			array($time, $time - 1)
		);
	}
Generate hashes for the current time and the specified sum

@param integer $sum

@return array