ATLAS Offline Software
Loading...
Searching...
No Matches
MD5.cxx File Reference

solar's public-domain MD5, wrapped for C++. More...

#include <string.h>
#include "CxxUtils/MD5.h"
Include dependency graph for MD5.cxx:

Go to the source code of this file.

Macros

#define F(x, y, z)
#define G(x, y, z)
#define H(x, y, z)
#define H2(x, y, z)
#define I(x, y, z)
#define STEP(f, a, b, c, d, x, t, s)
#define SET(n)
#define GET(n)
#define OUT(dst, src)

Detailed Description

solar's public-domain MD5, wrapped for C++.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov, from public domain code.
Date
Aug 2017

Definition in file MD5.cxx.

Macro Definition Documentation

◆ F

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

Definition at line 112 of file MD5.cxx.

◆ G

#define G ( x,
y,
z )
Value:
((y) ^ ((z) & ((x) ^ (y))))

Definition at line 113 of file MD5.cxx.

◆ GET

#define GET ( n)
Value:
(ctx->block[(n)])

Definition at line 153 of file MD5.cxx.

153#define GET(n) \
154 (ctx->block[(n)])

◆ H

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

Definition at line 114 of file MD5.cxx.

◆ H2

#define H2 ( x,
y,
z )
Value:
((x) ^ ((y) ^ (z)))

Definition at line 115 of file MD5.cxx.

◆ I

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

Definition at line 116 of file MD5.cxx.

◆ OUT

#define OUT ( dst,
src )
Value:
(dst)[0] = (unsigned char)(src); \
(dst)[1] = (unsigned char)((src) >> 8); \
(dst)[2] = (unsigned char)((src) >> 16); \
(dst)[3] = (unsigned char)((src) >> 24);

Definition at line 316 of file MD5.cxx.

316#define OUT(dst, src) \
317 (dst)[0] = (unsigned char)(src); \
318 (dst)[1] = (unsigned char)((src) >> 8); \
319 (dst)[2] = (unsigned char)((src) >> 16); \
320 (dst)[3] = (unsigned char)((src) >> 24);

◆ SET

#define SET ( n)
Value:
(ctx->block[(n)] = \
(MD5_u32plus)ptr[(n) * 4] | \
((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
((MD5_u32plus)ptr[(n) * 4 + 3] << 24))

Definition at line 147 of file MD5.cxx.

147#define SET(n) \
148 (ctx->block[(n)] = \
149 (MD5_u32plus)ptr[(n) * 4] | \
150 ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
151 ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
152 ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))

◆ STEP

#define STEP ( f,
a,
b,
c,
d,
x,
t,
s )
Value:
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
(a) += (b);

Definition at line 121 of file MD5.cxx.

121#define STEP(f, a, b, c, d, x, t, s) \
122 (a) += f((b), (c), (d)) + (x) + (t); \
123 (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
124 (a) += (b);