#include "hash.h"
#include "util.h"
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
|
| #define | Ch(x, y, z) |
| |
| #define | Maj(x, y, z) |
| |
| #define | Sigma0(x) |
| |
| #define | Sigma1(x) |
| |
| #define | sigma0(x) |
| |
| #define | sigma1(x) |
| |
| #define | Round(a, b, c, d, e, f, g, h, k, w) |
| |
◆ Ch
Value:((z) ^ ((x) & ((y) ^ (z))))
Definition at line 17 of file hash_impl.h.
◆ Maj
Value:(((x) & (y)) | ((z) & ((x) | (y))))
Definition at line 18 of file hash_impl.h.
◆ Round
| #define Round |
( |
| a, |
|
|
| b, |
|
|
| c, |
|
|
| d, |
|
|
| e, |
|
|
| f, |
|
|
| g, |
|
|
| h, |
|
|
| k, |
|
|
| w ) |
Value: do { \
(h) = t1 + t2; \
} while(0)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition at line 24 of file hash_impl.h.
24#define Round(a,b,c,d,e,f,g,h,k,w) do { \
25 uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \
26 uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \
27 (d) += t1; \
28 (h) = t1 + t2; \
29} while(0)
◆ Sigma0
Value:(((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10))
Definition at line 19 of file hash_impl.h.
◆ sigma0
Value:(((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3))
Definition at line 21 of file hash_impl.h.
◆ Sigma1
Value:(((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7))
Definition at line 20 of file hash_impl.h.
◆ sigma1
Value:(((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10))
Definition at line 22 of file hash_impl.h.