#include <botan/sha2_64.h>
#include <botan/loadstor.h>
#include <botan/rotate.h>
#include <botan/cpuid.h>
Go to the source code of this file.
|
#define | SHA2_64_F(A, B, C, D, E, F, G, H, M1, M2, M3, M4, magic) |
|
◆ SHA2_64_F
#define SHA2_64_F |
( |
|
A, |
|
|
|
B, |
|
|
|
C, |
|
|
|
D, |
|
|
|
E, |
|
|
|
F, |
|
|
|
G, |
|
|
|
H, |
|
|
|
M1, |
|
|
|
M2, |
|
|
|
M3, |
|
|
|
M4, |
|
|
|
magic |
|
) |
| |
Value: do { \
const uint64_t E_rho = rotr<14>(E) ^ rotr<18>(E) ^ rotr<41>(E); \
const uint64_t A_rho = rotr<28>(A) ^ rotr<34>(A) ^ rotr<39>(A); \
const uint64_t M2_sigma = rotr<19>(M2) ^ rotr<61>(M2) ^ (M2 >> 6); \
const uint64_t M4_sigma = rotr<1>(M4) ^ rotr<8>(M4) ^ (M4 >> 7); \
H += magic + E_rho + ((E & F) ^ (~E & G)) + M1; \
D += H; \
H += A_rho + ((A & B) | ((A | B) & C)); \
M1 += M2_sigma + M3 + M4_sigma; \
} while(0);
Definition at line 52 of file sha2_64.cpp.
53 { \
54 const uint64_t E_rho = rotr<14>(E) ^ rotr<18>(E) ^ rotr<41>(E); \
55 const uint64_t A_rho = rotr<28>(A) ^ rotr<34>(A) ^ rotr<39>(A); \
56 const uint64_t M2_sigma = rotr<19>(M2) ^ rotr<61>(M2) ^ (M2 >> 6); \
57 const uint64_t M4_sigma = rotr<1>(M4) ^ rotr<8>(M4) ^ (M4 >> 7); \
58 H += magic + E_rho + ((E & F) ^ (~E & G)) + M1; \
59 D += H; \
60 H += A_rho + ((A & B) | ((A | B) & C)); \
61 M1 += M2_sigma + M3 + M4_sigma; \
62 } while(0);