base64.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. https://github.com/superwills/NibbleAndAHalf
  3. base64.h -- Fast base64 encoding and decoding.
  4. version 1.0.0, April 17, 2013 143a
  5. Copyright (C) 2013 William Sherif
  6. This software is provided 'as-is', without any express or implied
  7. warranty. In no event will the authors be held liable for any damages
  8. arising from the use of this software.
  9. Permission is granted to anyone to use this software for any purpose,
  10. including commercial applications, and to alter it and redistribute it
  11. freely, subject to the following restrictions:
  12. 1. The origin of this software must not be misrepresented; you must not
  13. claim that you wrote the original software. If you use this software
  14. in a product, an acknowledgment in the product documentation would be
  15. appreciated but is not required.
  16. 2. Altered source versions must be plainly marked as such, and must not be
  17. misrepresented as being the original software.
  18. 3. This notice may not be removed or altered from any source distribution.
  19. William Sherif
  20. will.sherif@gmail.com
  21. YWxsIHlvdXIgYmFzZSBhcmUgYmVsb25nIHRvIHVz
  22. */
  23. #ifndef UA_BASE64_H_
  24. #define UA_BASE64_H_
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. char* UA_base64( const void* binaryData, int len, int *flen );
  29. unsigned char* UA_unbase64( const char* ascii, int len, int *flen );
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* UA_BASE64_H_ */