class wfJWT { private $claims; const JWT_TTL = 600; const ISSUER = 600; public static function extractTokenContents($token) { if (!is_string($token)) { throw new InvalidArgumentException('Token is not a string. ' . gettype($token) . ' given.'); } // Verify the token matches the JWT format. if (!preg_match('/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?$/', $token)) { throw new wfJWTException('Invalid token format.'); } list($header, $body, $signature) = explode('.', $token); // Test that the token is valid and not expired. $decodedHeader = base64_decode($header); if (!(is_string($decodedHeader) && $decodedHeader)) { throw new wfJWTException('Token header is invalid.'); } $header = json_decode($decodedHeader, true); if (!is_array($header)) { throw new wfJWTException('Token header is invalid.'); } $decodedBody = base64_decode($body); if (!(is_string($decodedBody) && $decodedBody)) { throw new wfJWTException('Token body is invalid.'); } $body = json_decode($decodedBody, true); if (!is_array($body)) { throw new wfJWTException('Token body is invalid.'); } return array( 'header' => $header, 'body' => $body, 'signature' => $signature, ); } /** * @param mixed $subject */ public function __construct($subject = null) { $this->claims = $this->getClaimDefaults(); $this->claims['sub'] = $subject; } /** * @return string */ public function encode() { $header = $this->encodeString($this->buildHeader()); $body = $this->encodeString($this->buildBody()); return sprintf('%s.%s.%s', $header, $body, $this->encodeString($this->sign(sprintf('%s.%s', $header, $body)))); } /** * @param string $token * @return array * @throws wfJWTException|InvalidArgumentException */ public function decode($token) { if (!is_string($token)) { throw new InvalidArgumentException('Token is not a string. ' . gettype($token) . ' given.'); } // Verify the token matches the JWT format. if (!preg_match('/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?$/', $token)) { throw new wfJWTException('Invalid token format.'); } list($header, $body, $signature) = explode('.', $token); // Verify signature matches the supplied payload. if (!$this->verifySignature($this->decodeString($signature), sprintf('%s.%s', $header, $body))) { throw new wfJWTException('Invalid signature.'); } // Test that the token is valid and not expired. $decodedHeader = base64_decode($header); if (!(is_string($decodedHeader) && $decodedHeader)) { throw new wfJWTException('Token header is invalid.'); } $header = json_decode($decodedHeader, true); if (!( is_array($header) && array_key_exists('alg', $header) && $header['alg'] === 'HS256' && $header['typ'] === 'JWT' )) { throw new wfJWTException('Token header is invalid.'); } $decodedBody = base64_decode($body); if (!(is_string($decodedBody) && $decodedBody)) { throw new wfJWTException('Token body is invalid.'); } $body = json_decode($decodedBody, true); if (!( is_array($body) && // Check the token not before now timestamp. array_key_exists('nbf', $body) && is_numeric($body['nbf']) && $body['nbf'] <= time() && // Check the token is not expired. array_key_exists('exp', $body) && is_numeric($body['exp']) && $body['exp'] >= time() && // Check the issuer and audience is ours. $body['iss'] === 'Wordfence ' . WORDFENCE_VERSION && $body['aud'] === 'Wordfence Central' )) { throw new wfJWTException('Token is invalid or expired.'); } return array( 'header' => $header, 'body' => $body, ); } /** * @param string $string * @return string */ public function sign($string) { $salt = wp_salt('auth'); return hash_hmac('sha256', $string, $salt, true); } /** * @param string $signature * @param string $message * @return bool */ public function verifySignature($signature, $message) { return hash_equals($this->sign($message), $signature); } /** * @return string */ public function __toString() { return $this->encode(); } /** * @param string $data * @return string */ public function encodeString($data) { return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); } /** * @param string $data * @return bool|string */ public function decodeString($data) { return base64_decode(strtr($data, '-_', '+/')); } /** * @return mixed|string */ protected function buildHeader() { return '{"alg":"HS256","typ":"JWT"}'; } /** * @return mixed|string */ protected function buildBody() { return json_encode($this->getClaims()); } /** * @return array */ protected function getClaimDefaults() { $now = time(); return array( 'iss' => 'Wordfence ' . WORDFENCE_VERSION, 'aud' => 'Wordfence Central', 'nbf' => $now, 'iat' => $now, 'exp' => $now + self::JWT_TTL, ); } /** * @param array $claims */ public function addClaims($claims) { if (!is_array($claims)) { throw new InvalidArgumentException(__METHOD__ . ' expects argument 1 to be array.'); } $this->setClaims(array_merge($this->getClaims(), $claims)); } /** * @return array */ public function getClaims() { return $this->claims; } /** * @param array $claims */ public function setClaims($claims) { $this->claims = $claims; } } class wfJWTException extends Exception { } If you want mass deportations, you can’t have less government | Right Tactics
HomePoliticalIf you want mass deportations, you can't have less government

If you want mass deportations, you can’t have less government

Published on

spot_img

Elon Musk and Vivek Ramaswamy have one job: to cut the size of government. President-elect Donald Trump asked their Department of Government Efficiency (DOGE) to advise the administration on how to “dismantle government bureaucracy” within a year and a half. On the Lex Fridman Podcast earlier this month, Ramaswamy explained how deep the envisioned cuts are.

“If your Social Security number ends in an odd number, you’re out. It ends in an even number, you’re in. There’s a 50 percent cut right there. Of those who remain, if your Social Security number starts with an even number, you’re in, and if it starts with an odd number, you’re out. Boom. That’s a 75 percent reduction,” Ramaswamy said. “So now imagine you could do that same thought experiment, but not just doing it at random.”

It’s hard to square those kinds of cuts—or any cuts at all—with Trump’s plan for “the largest deportation program in American history” as soon as he comes into office. The Department of Homeland Security, which would be responsible for immigrant roundups, has the second-largest civilian staff of any federal agency. In fact, any serious deportation program would probably require hiring more government employees.

Lex Fridman, host of the Lex Fridman Podcast, asked Ramaswamy about exactly that issue. Ramaswamy tried to downplay the cost of immigration enforcement. “If you look at the number of people who are looking after the border, it’s not even 0.1 percent of the federal employee base today,” he said. That’s not quite true. Together, Immigration and Customs Enforcement and Customs and Border Protection employ 88,000 people, out of a total federal civilian work force of 2.3 million, comprising nearly 4 percent of federal employees.

And actually carrying out deportations on the scale Trump wants might require doubling the size of the Department of Homeland Security, which currently employs 222,539 employees total. A report last month by the American Immigration Council calculated that rounding up all 13.3 million undocumented migrants would require hiring 220,000–409,000 federal government staff and cost $89.3 billion. Staggering the roundups at a rate of 1 million per year would similarly require hiring 30,000 new staff and cost $77.4 billion.

Trump has promised to use “military assets” for mass deportations, likely by having U.S. troops help set up detention camps. There are 392,897 active-duty U.S. Army soldiers and 314,693 Army National Guardsmen stationed on U.S. soil, according to the most recent deployment numbers. Although they might be able to reduce some of the burden on civilian federal workers, not all troops can be pulled away from their duties, and not all the tasks of deportation can be done by soldiers.

For example, one of the biggest bottlenecks in deportation is the immigration court system. Even setting up tent-style courtrooms would add $34.1 billion to the cost of deporting all 13.3 million undocumented migrants at once or $12.6 billion per year to the cost of deporting 1 million immigrants per year.

The issue of immigration courts raises another problem. In a Wall Street Journal essay announcing DOGE’s mission, Musk and Ramaswamy complained that most government decisions “aren’t made by the democratically elected president or even his political appointees but by millions of unelected, unappointed civil servants within government agencies” and promised to liberate the country from those bureaucrats.

The immigration system, though, is exactly that kind of bureaucracy. Immigration “courts” aren’t real courts, part of the judicial branch and overseen by independent, appointed judges. Instead, immigration “judges” are attorneys from the Department of Justice’s Executive Office for Immigration Review. The immigration system gives bureaucrats even greater power to impose life-altering consequences on people than the other regulators Musk and Ramaswamy have taken aim at.

On the conflict between mass deportations and reining in the federal bureaucracy, Harvard Law School professor Adrian Vermeule put it well: “Friends, I’m afraid you’ll have to pick one and only one.”

Latest articles

Understanding Trenbolone Enanthate 200 Dosage

Trenbolone Enanthate is a powerful anabolic steroid that is widely used by athletes and...

Games, Bonuses, Mobile App, and Login Ways

Put out within the January 2006, Mister Cash is indeed one of the earliest...

The Understanding of Wagering Requirements in Casino Promotions: Why They Keep Players Coming Back

Casino bonuses appeal to millions of players worldwide, yet few understand how online casinos...

Mastering the basics A beginner's guide to understanding gambling principles

Mastering the basics A beginner's guide to understanding gambling principles Understanding Gambling Fundamentals Gambling is an...

More like this

Understanding Trenbolone Enanthate 200 Dosage

Trenbolone Enanthate is a powerful anabolic steroid that is widely used by athletes and...

Games, Bonuses, Mobile App, and Login Ways

Put out within the January 2006, Mister Cash is indeed one of the earliest...

The Understanding of Wagering Requirements in Casino Promotions: Why They Keep Players Coming Back

Casino bonuses appeal to millions of players worldwide, yet few understand how online casinos...