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) |
| #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) |
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.
Value:((
z) ^ ((
x) & ((
y) ^ (
z))))
Definition at line 112 of file MD5.cxx.
Value:((
y) ^ ((
z) & ((
x) ^ (
y))))
Definition at line 113 of file MD5.cxx.
◆ GET
Value:
Definition at line 153 of file MD5.cxx.
153#define GET(n) \
154 (ctx->block[(n)])
◆ H2
◆ 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 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
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);