false, 'message' => 'invalid_app_key', ]); exit; } } /** * Determine if the provided key is the device key. */ public static function isDeviceKey(?string $key): bool { return $key !== null && hash_equals(DEVICE_KEY, $key); } /** * Determine if the provided key is the app key. */ public static function isAppKey(?string $key): bool { return $key !== null && hash_equals(APP_KEY, $key); } }