ekg2  GIT master
Struktury danych | Definicje | Funkcje
Dokumentacja pliku digest.c
#include "ekg2.h"
#include <stdio.h>
#include <string.h>
Wykres zależności załączania dla digest.c:

Struktury danych

struct  EKG2_MD5_CTX
 

Definicje

#define MD5Init(ctx)   Init(ctx)
 
#define MD5Transform(state, buffer)   Transform(state, buffer)
 
#define MD5Update(ctx, data, len)   Update(ctx, (unsigned char *) data, len)
 
#define MD5Final(digest, ctx)   Final(digest, ctx)
 
#define rol(value, bits)   (((value) << (bits)) | ((value) >> (32 - (bits))))
 
#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
 

Funkcje

static void Init (EKG2_MD5_CTX *context)
 
static void Transform (guint32 state[4], unsigned char buffer[64])
 
static void Update (EKG2_MD5_CTX *context, unsigned char *data, unsigned int len)
 
static void Final (unsigned char digest[20], EKG2_MD5_CTX *context)
 
static void Encode (unsigned char *output, guint32 *input, unsigned int len)
 
static void Final (unsigned char digest[16], EKG2_MD5_CTX *context)
 
char * icq_md5_digest (const char *password, const unsigned char *key, int key_len)
 

Dokumentacja definicji

◆ F

#define F (   x,
  y,
 
)    (((x) & (y)) | ((~x) & (z)))

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += F ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); }

◆ G

#define G (   x,
  y,
 
)    (((x) & (z)) | ((y) & (~z)))

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += G ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); }

◆ H

#define H (   x,
  y,
 
)    ((x) ^ (y) ^ (z))

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += H ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); }

◆ I

#define I (   x,
  y,
 
)    ((y) ^ ((x) | (~z)))

◆ II

#define II (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += I ((b), (c), (d)) + (x) + (guint32)(ac); (a) = rol((a), (s)); (a) += (b); }

◆ MD5Final

#define MD5Final (   digest,
  ctx 
)    Final(digest, ctx)

◆ MD5Init

#define MD5Init (   ctx)    Init(ctx)

◆ MD5Transform

#define MD5Transform (   state,
  buffer 
)    Transform(state, buffer)

◆ MD5Update

#define MD5Update (   ctx,
  data,
  len 
)    Update(ctx, (unsigned char *) data, len)

◆ rol

#define rol (   value,
  bits 
)    (((value) << (bits)) | ((value) >> (32 - (bits))))

◆ S11

#define S11   7

◆ S12

#define S12   12

◆ S13

#define S13   17

◆ S14

#define S14   22

◆ S21

#define S21   5

◆ S22

#define S22   9

◆ S23

#define S23   14

◆ S24

#define S24   20

◆ S31

#define S31   4

◆ S32

#define S32   11

◆ S33

#define S33   16

◆ S34

#define S34   23

◆ S41

#define S41   6

◆ S42

#define S42   10

◆ S43

#define S43   15

◆ S44

#define S44   21

Dokumentacja funkcji

◆ Encode()

static void Encode ( unsigned char *  output,
guint32 *  input,
unsigned int  len 
)
static

◆ Final() [1/2]

static void Final ( unsigned char  digest[20],
EKG2_MD5_CTX context 
)
static

◆ Final() [2/2]

static void Final ( unsigned char  digest[16],
EKG2_MD5_CTX context 
)
static

◆ icq_md5_digest()

char* icq_md5_digest ( const char *  password,
const unsigned char *  key,
int  key_len 
)

◆ Init()

static void Init ( EKG2_MD5_CTX context)
static

◆ Transform()

static void Transform ( guint32  state[4],
unsigned char  buffer[64] 
)
static

◆ Update()

static void Update ( EKG2_MD5_CTX context,
unsigned char *  data,
unsigned int  len 
)
static