Botan 2.19.5 Crypto and TLS for C&

Namespaces | Macros
sha2_32.cpp File Reference
`#include <botan/sha2_32.h>`
`#include <botan/loadstor.h>`
`#include <botan/rotate.h>`
`#include <botan/cpuid.h>`

Go to the source code of this file.

## Namespaces
namespace | Botan

## Macros
#define | SHA2_32_F(A, B, C, D, E, F, G, H, M1, M2, M3, M4, magic)

## Macro Definition Documentation

## ◆ SHA2_32_F

#define SHA2_32_F | ( |  | A,
|  |  | B,
|  |  | C,
|  |  | D,
|  |  | E,
|  |  | F,
|  |  | G,
|  |  | H,
|  |  | M1,
|  |  | M2,
|  |  | M3,
|  |  | M4,
|  |  | magic
| ) |  |

Value:
do { \
uint32_t A_rho = rotr<2>(A) ^ rotr<13>(A) ^ rotr<22>(A); \
uint32_t E_rho = rotr<6>(E) ^ rotr<11>(E) ^ rotr<25>(E); \
uint32_t M2_sigma = rotr<17>(M2) ^ rotr<19>(M2) ^ (M2 >> 10); \
uint32_t M4_sigma = rotr<7>(M4) ^ rotr<18>(M4) ^ (M4 >> 3); \
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 62 of file sha2_32.cpp.