Beispiel #1
0
static char* hash_with_local_file(const char* uin,const char* ptwebqq,lwqq_js_t* js)
{
	char path[512] = {0};
	if(access(LOCAL_HASH_JS(path), F_OK)!=0)
		if(access(GLOBAL_HASH_JS(path),F_OK)!=0)
			return NULL;
	lwqq_jso_t* obj = lwqq_js_load(js, path);
	char* res = NULL;

	res = lwqq_js_hash(uin, ptwebqq, js);
	lwqq_js_unload(js, obj);

	return res;
}
Beispiel #2
0
static char* hash_with_local_file(const char* uin, const char* ptwebqq,
                                  lwqq_js_t* js)
{
   char* js_txt = lwqq_util_load_res("hash.js", 0);
   if (js_txt == NULL)
      return NULL;

   lwqq_js_load_buffer(js, js_txt);

   char* res = lwqq_js_hash(uin, ptwebqq, js);
   s_free(js_txt);

   return res;
}