libxcks  0.1.0.1
md5.cpp File Reference

Compute md5 hash. More...

#include <cstring>
#include "md5.hpp"
Include dependency graph for md5.cpp:

Go to the source code of this file.

Macros

#define X(a)   do { *(uint32_t*)p = a ; p += 4; } while(0)
 Helper function for MD5's computing. More...
 
#define FF(b, c, d)   (d ^ (b & (c ^ d)))
 First fonction of the MD5 algorithm. More...
 
#define FG(b, c, d)   FF (d, b, c)
 Second fonction of the MD5 algorithm. More...
 
#define FH(b, c, d)   (b ^ c ^ d)
 Third fonction of the MD5 algorithm. More...
 
#define FI(b, c, d)   (c ^ (b | ~d))
 Fourth fonction of the MD5 algorithm. More...
 
#define OP(a, b, c, d, s, T)
 First round. More...
 
#define OP(f, a, b, c, d, k, s, T)
 First round. More...
 

Detailed Description

Compute md5 hash.

Definition in file md5.cpp.

Macro Definition Documentation

◆ FF

#define FF (   b,
  c,
 
)    (d ^ (b & (c ^ d)))

First fonction of the MD5 algorithm.

Definition at line 192 of file md5.cpp.

◆ FG

#define FG (   b,
  c,
 
)    FF (d, b, c)

Second fonction of the MD5 algorithm.

Definition at line 193 of file md5.cpp.

◆ FH

#define FH (   b,
  c,
 
)    (b ^ c ^ d)

Third fonction of the MD5 algorithm.

Definition at line 194 of file md5.cpp.

◆ FI

#define FI (   b,
  c,
 
)    (c ^ (b | ~d))

Fourth fonction of the MD5 algorithm.

Definition at line 195 of file md5.cpp.

◆ OP [1/2]

#define OP (   a,
  b,
  c,
  d,
  s,
 
)
Value:
do \
{ \
a += FF(b, c, d) + (*cwp++) + T; \
a = rol(a, s); \
a += b; \
} \
while (0)
#define FF(b, c, d)
First fonction of the MD5 algorithm.
Definition: md5.cpp:192

First round.

Second round.

◆ OP [2/2]

#define OP (   f,
  a,
  b,
  c,
  d,
  k,
  s,
 
)
Value:
do \
{ \
a += f (b, c, d) + correct_words[k] + T; \
a = rol (a, s); \
a += b; \
} \
while (0)

First round.

Second round.

◆ X

#define X (   a)    do { *(uint32_t*)p = a ; p += 4; } while(0)

Helper function for MD5's computing.