//
// Created by Fear1ess on 2021/4/2.
//

#ifndef REYUNSDK_UTILS_H
#define REYUNSDK_UTILS_H

#include "cJSON.h"
#include <jni.h>

void addJniStringToJson(JNIEnv* env, cJSON* json, const char* key, jobject jstr);
void getJniStringSha256(JNIEnv* env, jobject jstr, char* sha256);
void bytes2Hex(const unsigned char* source, char* dest, int sourceLen, int mac_format);
void hex2Bytes(const char* source, unsigned char* dest, int sourceLen);
int readCmd(const char* cmd, const char* mode, char* r_buf, size_t r_len);
char *wd_util_trim(char *start);

#endif //REYUNSDK_UTILS_H
