solar's public-domain MD5, wrapped for C++.
More...
#include <string.h>
#include "CxxUtils/MD5.h"
Go to the source code of this file.
|
#define | F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) |
|
#define | G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) |
|
#define | H(x, y, z) (((x) ^ (y)) ^ (z)) |
|
#define | H2(x, y, z) ((x) ^ ((y) ^ (z))) |
|
#define | I(x, y, z) ((y) ^ ((x) | ~(z))) |
|
#define | STEP(f, a, b, c, d, x, t, s) |
|
#define | SET(n) |
|
#define | GET(n) (ctx->block[(n)]) |
|
#define | OUT(dst, src) |
|
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.
#define F |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((z) ^ ((x) & ((y) ^ (z)))) |
#define G |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((y) ^ ((z) & ((x) ^ (y)))) |
◆ GET
#define GET |
( |
|
n | ) |
(ctx->block[(n)]) |
#define H |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| (((x) ^ (y)) ^ (z)) |
◆ H2
#define H2 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((x) ^ ((y) ^ (z))) |
#define I |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| ((y) ^ ((x) | ~(z))) |
◆ OUT
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 317 of file MD5.cxx.
◆ SET
Value:
(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 148 of file MD5.cxx.
◆ 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)))); \
Definition at line 122 of file MD5.cxx.