base64.h 575 B

123456789101112131415161718192021
  1. /*
  2. * Base64 encoding/decoding (RFC1341)
  3. * Copyright (c) 2005, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. // https://web.mit.edu/freebsd/head/contrib/wpa/src/utils/base64.h
  9. #ifndef BASE64_H
  10. #define BASE64_H
  11. #include <stdint.h>
  12. #include <stddef.h>
  13. #include <stdlib.h>
  14. #include <string.h>
  15. unsigned char* base64_encode(const unsigned char* src, size_t len, size_t* out_len);
  16. unsigned char* base64_decode(const unsigned char* src, size_t len, size_t* out_len);
  17. #endif /* BASE64_H */