#include "SHA1.hpp"
#include "string.h"
Defines | |
#define | S(x, n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) |
#define | R(t) |
#define | P(a, b, c, d, e, x) |
#define | F(x, y, z) (z ^ (x & (y ^ z))) |
#define | K 0x5A827999 |
#define | F(x, y, z) (x ^ y ^ z) |
#define | K 0x6ED9EBA1 |
#define | F(x, y, z) ((x & y) | (z & (x | y))) |
#define | K 0x8F1BBCDC |
#define | F(x, y, z) (x ^ y ^ z) |
#define | K 0xCA62C1D6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \ e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \ } |
|
Value: ( \ temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ \ W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \ ( W[t & 0x0F] = S(temp,1) ) \ ) |
|
|