diff options
Diffstat (limited to 'src/base64.c')
-rw-r--r-- | src/base64.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/base64.c b/src/base64.c deleted file mode 100644 index 50ec3981..00000000 --- a/src/base64.c +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011-2020 David Robillard <d@drobilla.net> -// SPDX-License-Identifier: ISC - -#include "base64.h" - -#include "exess/exess.h" -#include "serd/string.h" - -#include <stdlib.h> - -void* -serd_base64_decode(const char* const str, const size_t len, size_t* const size) -{ - const size_t max_size = exess_base64_decoded_size(len); - - void* const buf = malloc(max_size); - const ExessVariableResult r = exess_read_base64(max_size, buf, str); - if (r.status) { - *size = 0; - free(buf); - return NULL; - } - - *size = r.write_count; - - return buf; -} |