equal
deleted
inserted
replaced
33 #endif |
33 #endif |
34 |
34 |
35 #define HMAC_IPAD 0x36363636 |
35 #define HMAC_IPAD 0x36363636 |
36 #define HMAC_OPAD 0x5c5c5c5c |
36 #define HMAC_OPAD 0x5c5c5c5c |
37 |
37 |
38 const char *hex_tab = "0123456789abcdef"; |
38 static const char *hex_tab = "0123456789abcdef"; |
39 void toHex(const unsigned char *in, int length, unsigned char *out) { |
39 static void toHex(const unsigned char *in, int length, unsigned char *out) { |
40 int i; |
40 int i; |
41 |
41 |
42 for(i = 0; i < length; i++) { |
42 for(i = 0; i < length; i++) { |
43 out[i * 2] = hex_tab[(in[i] >> 4) & 0xF]; |
43 out[i * 2] = hex_tab[(in[i] >> 4) & 0xF]; |
44 out[i * 2 + 1] = hex_tab[(in[i]) & 0xF]; |
44 out[i * 2 + 1] = hex_tab[(in[i]) & 0xF]; |