Monero
Namespaces | Macros | Functions
md5_l.inl File Reference
#include <arpa/inet.h>
#include "md5global.h"
#include "md5_l.h"
Include dependency graph for md5_l.inl:
This graph shows which files directly or indirectly include this file:

Namespaces

 md5
 

Macros

#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
 
#define MD5_M_F(x, y, z)   (((x) & (y)) | ((~x) & (z)))
 
#define MD5_M_G(x, y, z)   (((x) & (z)) | ((y) & (~z)))
 
#define MD5_M_H(x, y, z)   ((x) ^ (y) ^ (z))
 
#define MD5_M_I(x, y, z)   ((y) ^ ((x) | (~z)))
 
#define ROTATE_LEFT(x, n)   (((x) << (n)) | ((x) >> (32-(n))))
 
#define FF(a, b, c, d, x, s, ac)   { (a) += MD5_M_F ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
 
#define GG(a, b, c, d, x, s, ac)   { (a) += MD5_M_G ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
 
#define HH(a, b, c, d, x, s, ac)   { (a) += MD5_M_H ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
 
#define II(a, b, c, d, x, s, ac)   { (a) += MD5_M_I ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
 

Functions

static void md5::MD5_memcpy (POINTER output, POINTER input, unsigned int len)
 
static void md5::MD5Transform (UINT4 state[4], unsigned char block[64])
 
static unsigned char * md5::PADDING ()
 
static void md5::MD5Init (MD5_CTX *context)
 
static void md5::MD5Update (MD5_CTX *context, const unsigned char *input, unsigned int inputLen)
 
static void md5::Encode (unsigned char *output, UINT4 *input, unsigned int len)
 
static void md5::Decode (UINT4 *output, unsigned char *input, unsigned int len)
 
static void md5::MD5Final (unsigned char digest[16], MD5_CTX *context)
 

Macro Definition Documentation

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += MD5_M_F ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += MD5_M_G ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += MD5_M_H ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }

◆ II

#define II (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)    { (a) += MD5_M_I ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }

◆ MD5_M_F

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

◆ MD5_M_G

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

◆ MD5_M_H

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

◆ MD5_M_I

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

◆ ROTATE_LEFT

#define ROTATE_LEFT (   x,
 
)    (((x) << (n)) | ((x) >> (32-(n))))

◆ 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