summaryrefslogtreecommitdiff
path: root/lib/base64.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base64.c')
-rw-r--r--lib/base64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/base64.c b/lib/base64.c
index d5f3ae9b..1f7fb4f0 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -26,12 +26,12 @@ static const unsigned char base64_table[65] =
* nul terminated to make it easier to use as a C string. The nul terminator is
* not included in out_len.
*/
-struct bytestring * base64_encode(linpool *pool,
+struct adata * base64_encode(linpool *pool,
const unsigned char *src, size_t len,
size_t *out_len)
{
unsigned char *pos;
- struct bytestring *out;
+ struct adata *out;
const unsigned char *end, *in;
size_t olen;
int line_len;
@@ -41,7 +41,7 @@ struct bytestring * base64_encode(linpool *pool,
olen++; /* nul termination */
if (olen < len)
return NULL; /* integer overflow */
- out = lp_alloc(pool, sizeof(struct bytestring) + olen);
+ out = lp_alloc(pool, sizeof(struct adata) + olen);
if (out == NULL)
return NULL;
@@ -97,14 +97,14 @@ struct bytestring * base64_encode(linpool *pool,
*
* Caller is responsible for freeing the returned buffer.
*/
-struct bytestring * base64_decode_bs(linpool *pool,
+struct adata * base64_decode_bs(linpool *pool,
const unsigned char *src, size_t len,
size_t *out_len)
{
unsigned char dtable[256], *pos, block[4], tmp;
size_t i, count, olen;
int pad = 0;
- struct bytestring *out;
+ struct adata *out;
memset(dtable, 0x80, 256);
for (i = 0; i < sizeof(base64_table) - 1; i++)
@@ -121,7 +121,7 @@ struct bytestring * base64_decode_bs(linpool *pool,
return NULL;
olen = count / 4 * 3;
- out = lp_alloc(pool, sizeof(struct bytestring) + olen);
+ out = lp_alloc(pool, sizeof(struct adata) + olen);
if (out == NULL)
return NULL;
pos = out->data;