public QueryString check(AuthParameters auth, QueryString queryString)
			throws MalformedURLException, IOException, NoSuchAlgorithmException {
		if (auth.getAuthWithApiId() && auth.getApiId() != null) {
			queryString.add("api_id", auth.getApiId());
		} else if (auth.getAuthWithoutToken() && auth.getLogin() != null
				&& auth.getPassword() != null) {
			queryString.add("login", auth.getLogin()).add("password",
					auth.getPassword());
		} else if (auth.getAuthWithToken() && auth.getLogin() != null
				&& auth.getPassword() != null) {
			String token = new GetRequest()
					.getResponse("http://sms.ru/auth/get_token");
			String sha512 = toSha512(auth.getPassword(), token);
			queryString.add("login", auth.getLogin()).add("token", token)
					.add("sha512", sha512);
		}

		return queryString;
	}