|
| #define | LITTLE_ENDIAN |
| |
| #define | SHA1HANDSOFF |
| |
| #define | SHA1Init(ctx) Init(ctx, 1) |
| |
| #define | SHA1Transform(state, buffer) Transform(state, buffer, 1) |
| |
| #define | SHA1Update(ctx, data, len) Update(ctx, (unsigned char *) data, len, 1) |
| |
| #define | SHA1Final(digest, ctx) Final(digest, ctx, 1) |
| |
| #define | MD5Init(ctx) Init(ctx, 0) |
| |
| #define | MD5Transform(state, buffer) Transform(state, buffer, 0) |
| |
| #define | MD5Update(ctx, data, len) Update(ctx, (unsigned char *) data, len, 0) |
| |
| #define | MD5Final(digest, ctx) Final(digest, ctx, 0) |
| |
| #define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
| |
| #define | blk0(i) |
| |
| #define | blk(i) |
| |
| #define | R0(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
| |
| #define | R1(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); |
| |
| #define | R2(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); |
| |
| #define | R3(v, w, x, y, z, i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
| |
| #define | R4(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
| |
| #define | F(x, y, z) (((x) & (y)) | ((~x) & (z))) |
| |
| #define | G(x, y, z) (((x) & (z)) | ((y) & (~z))) |
| |
| #define | H(x, y, z) ((x) ^ (y) ^ (z)) |
| |
| #define | I(x, y, z) ((y) ^ ((x) | (~z))) |
| |
| #define | FF(a, b, c, d, x, s, ac) { (a) += F ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); } |
| |
| #define | GG(a, b, c, d, x, s, ac) { (a) += G ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); } |
| |
| #define | HH(a, b, c, d, x, s, ac) { (a) += H ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); } |
| |
| #define | II(a, b, c, d, x, s, ac) { (a) += I ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); } |
| |
| #define | S11 7 |
| |
| #define | S12 12 |
| |
| #define | S13 17 |
| |
| #define | S14 22 |
| |
| #define | S21 5 |
| |
| #define | S22 9 |
| |
| #define | S23 14 |
| |
| #define | S24 20 |
| |
| #define | S31 4 |
| |
| #define | S32 11 |
| |
| #define | S33 16 |
| |
| #define | S34 23 |
| |
| #define | S41 6 |
| |
| #define | S42 10 |
| |
| #define | S43 15 |
| |
| #define | S44 21 |
| |
|
| static void | Init (EKG2_SHA1_CTX *context, int usesha) |
| |
| static void | Transform (guint32 state[5], unsigned char buffer[64], int usesha) |
| |
| static void | Update (EKG2_SHA1_CTX *context, unsigned char *data, unsigned int len, int usesha) |
| |
| static void | Final (unsigned char digest[20], EKG2_SHA1_CTX *context, int usesha) |
| |
| static void | Encode (unsigned char *output, guint32 *input, unsigned int len, int usesha) |
| |
| static char * | base16_encode (const unsigned char *data) |
| |
| char * | jabber_challenge_digest (const char *sid, const char *password, const char *nonce, const char *cnonce, const char *xmpp_temp, const char *realm) |
| |
| char * | jabber_dcc_digest (char *sid, char *initiator, char *target) |
| |
| char * | jabber_digest (const char *sid, const char *password, int istlen) |
| |
| char * | jabber_sha1_generic (char *buf, int len) |
| |