aboutsummaryrefslogtreecommitdiffstats
path: root/src/base64.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 23:49:10 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:15:32 +0200
commitdd7f57a7d955a323c5691ec64dd96e9b0a5a2553 (patch)
tree58f62490c75c52891d900139aa630bbd04d1e979 /src/base64.h
parent14c2fe14b90c1057b2829b7008423ef9bf79edef (diff)
downloadserd-dd7f57a7d955a323c5691ec64dd96e9b0a5a2553.tar.gz
serd-dd7f57a7d955a323c5691ec64dd96e9b0a5a2553.tar.bz2
serd-dd7f57a7d955a323c5691ec64dd96e9b0a5a2553.zip
Clean up and expose base64 implementation
Diffstat (limited to 'src/base64.h')
-rw-r--r--src/base64.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/base64.h b/src/base64.h
deleted file mode 100644
index cb89491c..00000000
--- a/src/base64.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- Copyright 2011-2018 David Robillard <http://drobilla.net>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#ifndef SERD_BASE64_H
-#define SERD_BASE64_H
-
-#include <stdbool.h>
-#include <stddef.h>
-
-/**
- Return the number of bytes required to encode `size` bytes in base64.
-
- @param size The number of input (binary) bytes to encode.
- @param wrap_lines Wrap lines at 76 characters to conform to RFC 2045.
- @return The length of the base64 encoding, excluding null terminator.
-*/
-size_t
-serd_base64_get_length(size_t size, bool wrap_lines);
-
-/**
- Encode `size` bytes of `buf` into `str`, which must be large enough.
-
- @param str Output string buffer.
- @param buf Input binary data.
- @param size Number of bytes to encode from `buf`.
- @param wrap_lines Wrap lines at 76 characters to conform to RFC 2045.
- @return True iff `str` contains newlines.
-*/
-bool
-serd_base64_encode(char* str, const void* buf, size_t size, bool wrap_lines);
-
-#endif // SERD_BASE64_H