summaryrefslogtreecommitdiff
path: root/uclient-utils.h
blob: a7eaf1cabac0a9ce2c5c2c6de2c9bc315accfef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef __UCLIENT_UTILS_H
#define __UCLIENT_UTILS_H

#include <stdbool.h>

static inline int base64_len(int len)
{
	return ((len + 2) / 3) * 4;
}

void base64_encode(const void *inbuf, unsigned int len, void *out);

int uclient_urldecode(const char *in, char *out, bool decode_plus);


#endif