public static function hmac($input, $additionalSecret = '') {
		$hashAlgorithm = 'sha1';
		$hashBlocksize = 64;
		$hmac = '';
		$secret = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] . $additionalSecret;
		if (extension_loaded('hash') && function_exists('hash_hmac') && function_exists('hash_algos') && in_array($hashAlgorithm, hash_algos())) {
			$hmac = hash_hmac($hashAlgorithm, $input, $secret);
		} else {
				// outer padding
			$opad = str_repeat(chr(0x5C), $hashBlocksize);
				// inner padding
			$ipad = str_repeat(chr(0x36), $hashBlocksize);
			if (strlen($secret) > $hashBlocksize) {
					// keys longer than block size are shorten
				$key = str_pad(pack('H*', call_user_func($hashAlgorithm, $secret)), $hashBlocksize, chr(0));
			} else {
					// keys shorter than block size are zero-padded
				$key = str_pad($secret, $hashBlocksize, chr(0));
			}
			$hmac = call_user_func($hashAlgorithm, ($key ^ $opad) . pack('H*', call_user_func($hashAlgorithm, ($key ^ $ipad) . $input)));
		}
		return $hmac;
	}