libxcks  0.1.0.1
md4.cpp File Reference

Compute md4 hash. More...

#include <cstring>
#include "md4.hpp"
Include dependency graph for md4.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 MD4's computing. More...
 
#define F(x, y, z)   ((z) ^ ((x) & ((y) ^ (z))))
 Helper function for MD4's computing. More...
 
#define G(x, y, z)   (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
 Helper function for MD4's computing. More...
 
#define H(x, y, z)   ((x) ^ (y) ^ (z))
 Helper function for MD4's computing. More...
 
#define function(a, b, c, d, k, s)   a=rol(a+F(b,c,d)+in[k],s);
 Helper function for MD4's computing. More...
 
#define function(a, b, c, d, k, s)   a=rol(a+G(b,c,d)+in[k]+0x5a827999,s);
 Helper function for MD4's computing. More...
 
#define function(a, b, c, d, k, s)   a=rol(a+H(b,c,d)+in[k]+0x6ed9eba1,s);
 Helper function for MD4's computing. More...
 

Detailed Description

Compute md4 hash.

Definition in file md4.cpp.

Macro Definition Documentation

◆ F

#define F (   x,
  y,
 
)    ((z) ^ ((x) & ((y) ^ (z))))

Helper function for MD4's computing.

◆ function [1/3]

#define function (   a,
  b,
  c,
  d,
  k,
 
)    a=rol(a+F(b,c,d)+in[k],s);

Helper function for MD4's computing.

◆ function [2/3]

#define function (   a,
  b,
  c,
  d,
  k,
 
)    a=rol(a+G(b,c,d)+in[k]+0x5a827999,s);

Helper function for MD4's computing.

◆ function [3/3]

#define function (   a,
  b,
  c,
  d,
  k,
 
)    a=rol(a+H(b,c,d)+in[k]+0x6ed9eba1,s);

Helper function for MD4's computing.

◆ G

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

Helper function for MD4's computing.

◆ H

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

Helper function for MD4's computing.

◆ X

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

Helper function for MD4's computing.