diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2024-03-17 15:27:22 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2024-03-17 15:27:22 +0000 |
| commit | 5f41eb798b639774d5cb2a7656fbaf4c61a16352 (patch) | |
| tree | 7e8da7d00fc4b4a6680b389500972d82358125bd | |
| parent | xmalloc: add xmemdup() and use to replace some uses of xmalloc+memcpy (diff) | |
base64: simplify lookup table initializer
| -rw-r--r-- | base64.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 * |
