base64.h 370 B

12345678910111213141516
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * base64 encoding, lifted from fs/crypto/fname.c.
  4. */
  5. #ifndef _LINUX_BASE64_H
  6. #define _LINUX_BASE64_H
  7. #include <linux/types.h>
  8. #define BASE64_CHARS(nbytes) DIV_ROUND_UP((nbytes) * 4, 3)
  9. int base64_encode(const u8 *src, int len, char *dst);
  10. int base64_decode(const char *src, int len, u8 *dst);
  11. #endif /* _LINUX_BASE64_H */