LIPH's C++ Codes
md5.cpp File Reference
#include "liph/crypto/md5.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <vector>

Namespaces

namespace  liph
 

Macros

#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 ROTATE_LEFT(x, n)   (((x) << (n)) | ((x) >> (32 - (n))))
 
#define FF(a, b, c, d, x, s, i)
 
#define GG(a, b, c, d, x, s, i)
 
#define HH(a, b, c, d, x, s, i)
 
#define II(a, b, c, d, x, s, i)
 

Functions

std::string liph::MD5 (const std::string &msg)
 
std::string liph::md5 (const std::string &msg)
 

Macro Definition Documentation

◆ F

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

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
  s,
 
)
Value:
{ \
(a) += F((b), (c), (d)) + X[x] + T[i]; \
(a) = ROTATE_LEFT((a), (s)); \
(a) += (b); \
}
#define ROTATE_LEFT(x, n)
#define F(x, y, z)
Definition: md5.cpp:34

◆ G

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

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
  s,
 
)
Value:
{ \
(a) += G((b), (c), (d)) + X[x] + T[i]; \
(a) = ROTATE_LEFT((a), (s)); \
(a) += (b); \
}
#define G(x, y, z)
Definition: md5.cpp:35

◆ H

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

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
  s,
 
)
Value:
{ \
(a) += H((b), (c), (d)) + X[x] + T[i]; \
(a) = ROTATE_LEFT((a), (s)); \
(a) += (b); \
}
#define H(x, y, z)
Definition: md5.cpp:36

◆ I

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

◆ II

#define II (   a,
  b,
  c,
  d,
  x,
  s,
 
)
Value:
{ \
(a) += I((b), (c), (d)) + X[x] + T[i]; \
(a) = ROTATE_LEFT((a), (s)); \
(a) += (b); \
}
#define I(x, y, z)
Definition: md5.cpp:37

◆ ROTATE_LEFT

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