luat_str.h 720 B

123456789101112131415161718
  1. #ifndef LUAT_STR_H
  2. #define LUAT_STR_H
  3. #include "string.h"
  4. void luat_str_tohexwithsep(char* str, size_t len, char* separator, size_t len_j, char* buff);
  5. void luat_str_tohex(char* str, size_t len, char* buff);
  6. void luat_str_fromhex(char* str, size_t len, char* buff);
  7. int luat_str_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
  8. const unsigned char *src, size_t slen );
  9. int luat_str_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
  10. const unsigned char *src, size_t slen );
  11. int luat_str_base32_decode(const uint8_t *encoded, uint8_t *result, int bufSize);
  12. int luat_str_base32_encode(const uint8_t *data, int length, uint8_t *result,int bufSize);
  13. #endif