From 5f41eb798b639774d5cb2a7656fbaf4c61a16352 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Sun, 17 Mar 2024 15:27:22 +0000 Subject: [PATCH] base64: simplify lookup table initializer --- base64.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/base64.c b/base64.c index fe89e9fa..5d01ab07 100644 --- a/base64.c +++ b/base64.c @@ -36,12 +36,9 @@ static const uint8_t reverse_lookup[256] = { }; static const char lookup[64] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+', '/', + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/" }; char *