transcode.h 834 B

12345678910111213141516171819202122232425262728
  1. #ifndef _TRANSCODE_H_
  2. #define _TRANSCODE_H_
  3. #include <stdio.h>
  4. #include "_string.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #ifdef GB_ENABLE
  9. int gb_encode(char *str_in,char *str_out);
  10. int gb_decode(char *str_in,char *str_out);
  11. #endif
  12. int get_gb_token(uint64_t token);
  13. unsigned char *device_encrypt(unsigned char *mac, int token, unsigned char *source,int len,int *pCipher_len);
  14. unsigned char *device_decrypt(unsigned char *mac, int token, unsigned char *source,int len);
  15. void wch_base64_encode(unsigned char * in, char * out, int size);
  16. int wch_base64_decode(char * in, unsigned char * out);
  17. void production_lic_set(unsigned char *mac, unsigned char *destin, int offset);
  18. bool check_lic_stat(unsigned char *mac, unsigned char *lic, int offset);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif // _BLETRANSCODE_H_