public static function generateSEPAMandateReference($prefix = '', $suffix = '', $length = 35, $useSpecialCharacters = false, $useLetters = true, $useNumbers = true)
	{
		if (!is_string($prefix) || !is_string($suffix) || !is_int($length))
		{
			throw new InvalidArgumentException();
		}
		if ($length > 35)
		{
			throw new InputRangeException("SEPA mandate reference number must not be greater thant 35!");
		}
		$length -= strlen($prefix);
		$length -= strlen($suffix);
		if ($length <= 0)
		{
			throw new InputRangeException("Length argument to small to have an random part in SEPA mandate reference.");
		}

		if (!$useSpecialCharacters && !$useLetters && !$useNumbers) {
			throw new InputRangeException("You need at least one allowed character type to generate a random string.");
		}

		$allowedCharacters = [];
		if ($useSpecialCharacters) {
			$allowedCharacters = array_merge($allowedCharacters, str_split(static::MANDATE_REFERENCE_ALLOWED_SPECIAL_CHARACTERS));
		}
		if ($useLetters) {
			$allowedCharacters = array_merge($allowedCharacters, range('A','Z'));
		}
		if ($useNumbers) {
			$allowedCharacters = array_merge($allowedCharacters, range('0','9'));
		}
		$max = count($allowedCharacters) - 1;
		$reference = '';
		for ($i = 0; $i < $length; $i++) {
			$rand = mt_rand(0, $max);
			$reference .= $allowedCharacters[$rand];
		}
		return strtoupper($prefix).$reference.strtoupper($suffix);
	}