Merge tag 'perf-tools-for-v6.4-3-2023-05-06' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / include / linux / base64.h
CommitLineData
a116e1cd
HR
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * base64 encoding, lifted from fs/crypto/fname.c.
4 */
5
6#ifndef _LINUX_BASE64_H
7#define _LINUX_BASE64_H
8
9#include <linux/types.h>
10
11#define BASE64_CHARS(nbytes) DIV_ROUND_UP((nbytes) * 4, 3)
12
13int base64_encode(const u8 *src, int len, char *dst);
14int base64_decode(const char *src, int len, u8 *dst);
15
16#endif /* _LINUX_BASE64_H */