libxcks  0.1.0.1
rmd160.cpp File Reference

Compute ripe-md160 hash. More...

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

Go to the source code of this file.

Macros

#define X(a)   do { *(uint32_t*)p = h##a ; p += 4; } while(0)
 Helper value for RIPE-MD160's computing. More...
 
#define K0   0x00000000
 Helper value for RIPE-MD160's computing. More...
 
#define K1   0x5A827999
 Helper value for RIPE-MD160's computing. More...
 
#define K2   0x6ED9EBA1
 Helper value for RIPE-MD160's computing. More...
 
#define K3   0x8F1BBCDC
 Helper value for RIPE-MD160's computing. More...
 
#define K4   0xA953FD4E
 Helper value for RIPE-MD160's computing. More...
 
#define KK0   0x50A28BE6
 Helper value for RIPE-MD160's computing. More...
 
#define KK1   0x5C4DD124
 Helper value for RIPE-MD160's computing. More...
 
#define KK2   0x6D703EF3
 Helper value for RIPE-MD160's computing. More...
 
#define KK3   0x7A6D76E9
 Helper value for RIPE-MD160's computing. More...
 
#define KK4   0x00000000
 Helper value for RIPE-MD160's computing. More...
 
#define F0(x, y, z)   ( (x) ^ (y) ^ (z) )
 Helper value for RIPE-MD160's computing. More...
 
#define F1(x, y, z)   ( ((x) & (y)) | (~(x) & (z)) )
 Helper value for RIPE-MD160's computing. More...
 
#define F2(x, y, z)   ( ((x) | ~(y)) ^ (z) )
 Helper value for RIPE-MD160's computing. More...
 
#define F3(x, y, z)   ( ((x) & (z)) | ((y) & ~(z)) )
 Helper value for RIPE-MD160's computing. More...
 
#define F4(x, y, z)   ( (x) ^ ((y) | ~(z)) )
 Helper value for RIPE-MD160's computing. More...
 
#define R(a, b, c, d, e, f, k, r, s)
 Helper value for RIPE-MD160's computing. More...
 

Detailed Description

Compute ripe-md160 hash.

Definition in file rmd160.cpp.

Macro Definition Documentation

◆ F0

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

Helper value for RIPE-MD160's computing.

◆ F1

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

Helper value for RIPE-MD160's computing.

◆ F2

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

Helper value for RIPE-MD160's computing.

◆ F3

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

Helper value for RIPE-MD160's computing.

◆ F4

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

Helper value for RIPE-MD160's computing.

◆ K0

#define K0   0x00000000

Helper value for RIPE-MD160's computing.

◆ K1

#define K1   0x5A827999

Helper value for RIPE-MD160's computing.

◆ K2

#define K2   0x6ED9EBA1

Helper value for RIPE-MD160's computing.

◆ K3

#define K3   0x8F1BBCDC

Helper value for RIPE-MD160's computing.

◆ K4

#define K4   0xA953FD4E

Helper value for RIPE-MD160's computing.

◆ KK0

#define KK0   0x50A28BE6

Helper value for RIPE-MD160's computing.

◆ KK1

#define KK1   0x5C4DD124

Helper value for RIPE-MD160's computing.

◆ KK2

#define KK2   0x6D703EF3

Helper value for RIPE-MD160's computing.

◆ KK3

#define KK3   0x7A6D76E9

Helper value for RIPE-MD160's computing.

◆ KK4

#define KK4   0x00000000

Helper value for RIPE-MD160's computing.

◆ R

#define R (   a,
  b,
  c,
  d,
  e,
  f,
  k,
  r,
 
)
Value:
do { t = a + f(b,c,d) + k + x[r]; \
a = rol(t,s) + e; \
c = rol(c,10); \
} while(0)

Helper value for RIPE-MD160's computing.

◆ X

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

Helper value for RIPE-MD160's computing.