summaryrefslogtreecommitdiffstats
path: root/include/base64.h
blob: 7da35e21bac58a151b0af267d79d50fdde6143b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __BASE64_H
#define __BASE64_H

void uuencode(char *p, const char *src, int length);
int decode_base64(char *dst, int dst_len, const char *src);
int decode_base64url(char *dst, int dst_len, const char *src);

#define BASE64_LENGTH(len)	(4 * (((len) + 2) / 3))

#endif /* __BASE64_H */