forked from gradetwo/fetion
-
Notifications
You must be signed in to change notification settings - Fork 2
/
f_util.h
36 lines (33 loc) · 1.21 KB
/
f_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _F_UTIL_H_
#define _F_UTIL_H_
#include "fetion.h"
#include "f_buddy.h"
#include "f_chat.h"
#include "f_group.h"
#include "f_login.h"
#include "f_sysmsg.h"
#include "f_portrait.h"
#include "f_user.h"
gchar *gencnonce(void);
gchar *gencallid(void);
gchar *get_token(const gchar * str, const gchar * start, const gchar * end);
gchar *fetion_cipher_digest_calculate_response(const gchar * sid,
const gchar * domain,
const gchar * password,
const gchar * nonce,
const gchar * cnonce);
gboolean IsCMccNo(gchar * name);
gboolean IsUnicomNo(gchar * name);
gchar *auth_header(struct fetion_account_data *sip,
struct sip_auth *auth, const gchar * method,
const gchar * target);
gchar *parse_attribute(const gchar * attrname, const gchar * source);
void fill_auth(struct fetion_account_data *sip, const gchar * hdr,
struct sip_auth *auth);
gchar *parse_from(const gchar * hdr);
char* generate_aes_key();
char* generate_response(const char* nouce , const char* userid,
const char* password , const char* publickey , const char* key);
unsigned char* strtohex(const char* in , int* len);
char* hextostr(const unsigned char* in , int len);
#endif