From d2c8ab0b6c9bb718a4e51828882ce3fbe6a513d5 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Mon, 2 Oct 2023 22:46:49 +0000 Subject: [PATCH] Revert "Export base64 encoder and decoder" There is currently no use for this. This reverts commit c38f669e1355856fe95e449825ae0649974ae6ec. --- include/neatvnc.h | 6 ------ src/base64.c | 15 --------------- 2 files changed, 21 deletions(-) diff --git a/include/neatvnc.h b/include/neatvnc.h index 1b4edb1..1c610fc 100644 --- a/include/neatvnc.h +++ b/include/neatvnc.h @@ -48,9 +48,6 @@ #define nvnc_trace(...) #endif -#define NVNC_BASE64_ENCODED_SIZE(x) ((((x) + 2) / 3) * 4 + 1) -#define NVNC_BASE64_DECODED_MAX_SIZE(x) ((((x) + 3) / 4) * 3) - struct nvnc; struct nvnc_client; struct nvnc_desktop_layout; @@ -241,6 +238,3 @@ void nvnc_set_cursor(struct nvnc*, struct nvnc_fb*, uint16_t width, void nvnc_set_log_fn(nvnc_log_fn); void nvnc_set_log_level(enum nvnc_log_level); void nvnc__log(const struct nvnc_log_data*, const char* fmt, ...); - -void nvnc_base64_encode(char* dst, const uint8_t* src, size_t src_len); -ssize_t nvnc_base64_decode(uint8_t* dst, const char* src); diff --git a/src/base64.c b/src/base64.c index 8e2f98e..8b461dd 100644 --- a/src/base64.c +++ b/src/base64.c @@ -14,7 +14,6 @@ */ #include "base64.h" -#include "neatvnc.h" #include #include @@ -22,8 +21,6 @@ #include #include -#define EXPORT __attribute__((visibility("default"))) - static const char base64_enc_lut[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -156,15 +153,3 @@ ssize_t base64_decode(uint8_t* dst, const char* src) return i * 3 + di; } - -EXPORT -void nvnc_base64_encode(char* dst, const uint8_t* src, size_t src_len) -{ - base64_encode(dst, src, src_len); -} - -EXPORT -ssize_t nvnc_base64_decode(uint8_t* dst, const char* src) -{ - return base64_decode(dst, src); -}