LLVM  14.0.0git
Namespaces | Macros
SHA256.cpp File Reference
#include "llvm/Support/SHA256.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Host.h"
#include <string.h>
Include dependency graph for SHA256.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 

Macros

#define SHR(x, c)   ((x) >> (c))
 
#define ROTR(x, n)   (((x) >> n) | ((x) << (32 - (n))))
 
#define CH(x, y, z)   (((x) & (y)) ^ (~(x) & (z)))
 
#define MAJ(x, y, z)   (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
 
#define SIGMA_0(x)   (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
 
#define SIGMA_1(x)   (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
 
#define SIGMA_2(x)   (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))
 
#define SIGMA_3(x)   (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))
 
#define F_EXPAND(A, B, C, D, E, F, G, H, M1, M2, M3, M4, k)
 

Macro Definition Documentation

◆ CH

#define CH (   x,
  y,
  z 
)    (((x) & (y)) ^ (~(x) & (z)))

Definition at line 38 of file SHA256.cpp.

◆ F_EXPAND

#define F_EXPAND (   A,
  B,
  C,
  D,
  E,
  F,
  G,
  H,
  M1,
  M2,
  M3,
  M4,
 
)
Value:
do { \
H += SIGMA_1(E) + CH(E, F, G) + M1 + k; \
D += H; \
H += SIGMA_0(A) + MAJ(A, B, C); \
M1 += SIGMA_2(M2) + M3 + SIGMA_3(M4); \
} while (0);

Definition at line 47 of file SHA256.cpp.

◆ MAJ

#define MAJ (   x,
  y,
  z 
)    (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))

Definition at line 39 of file SHA256.cpp.

◆ ROTR

#define ROTR (   x,
  n 
)    (((x) >> n) | ((x) << (32 - (n))))

Definition at line 36 of file SHA256.cpp.

◆ SHR

#define SHR (   x,
  c 
)    ((x) >> (c))

Definition at line 35 of file SHA256.cpp.

◆ SIGMA_0

#define SIGMA_0 (   x)    (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))

Definition at line 41 of file SHA256.cpp.

◆ SIGMA_1

#define SIGMA_1 (   x)    (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))

Definition at line 42 of file SHA256.cpp.

◆ SIGMA_2

#define SIGMA_2 (   x)    (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))

Definition at line 44 of file SHA256.cpp.

◆ SIGMA_3

#define SIGMA_3 (   x)    (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))

Definition at line 45 of file SHA256.cpp.

F
#define F(x, y, z)
Definition: MD5.cpp:56
SIGMA_3
#define SIGMA_3(x)
Definition: SHA256.cpp:45
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
MAJ
#define MAJ(x, y, z)
Definition: SHA256.cpp:39
G
const DataFlowGraph & G
Definition: RDFGraph.cpp:202
CH
#define CH(x, y, z)
Definition: SHA256.cpp:38
SIGMA_2
#define SIGMA_2(x)
Definition: SHA256.cpp:44
A
* A
Definition: README_ALTIVEC.txt:89
H
#define H(x, y, z)
Definition: MD5.cpp:58
SIGMA_0
#define SIGMA_0(x)
Definition: SHA256.cpp:41
SIGMA_1
#define SIGMA_1(x)
Definition: SHA256.cpp:42
llvm::M1
unsigned M1(unsigned Val)
Definition: VE.h:372