Contains the code implementing the SHA-256 hashfunction. More...
#include "sha256.hpp"
Go to the source code of this file.
Macros | |
#define | ROTR(n, x) ( ((x)>>(n)) | ((x)<<(32-(n))) ) |
#define | SHR(n, x) ((x)>>(n)) |
#define | CH(x, y, z) ( ((x)&(y)) ^ ((~x)&(z)) ) |
#define | MAJ(x, y, z) ( ((x)&(y)) ^ ((x)&(z)) ^ ((y)&(z)) ) |
#define | BIGSIGMA0(x) ( ROTR(2,(x)) ^ ROTR(13,(x)) ^ ROTR(22,(x)) ) |
#define | BIGSIGMA1(x) ( ROTR(6,(x)) ^ ROTR(11,(x)) ^ ROTR(25,(x)) ) |
#define | SMALLSIGMA0(x) ( ROTR(7,(x)) ^ ROTR(18,(x)) ^ SHR(3,(x)) ) |
#define | SMALLSIGMA1(x) ( ROTR(17,(x)) ^ ROTR(19,(x)) ^ SHR(10,(x)) ) |
Variables | |
uint32_t | init256 [8] |
uint32_t | K256 [64] |
Contains the code implementing the SHA-256 hashfunction.
Definition in file sha256.cpp.
Definition at line 24 of file sha256.cpp.
Definition at line 25 of file sha256.cpp.
#define CH | ( | x, | |
y, | |||
z | |||
) | ( ((x)&(y)) ^ ((~x)&(z)) ) |
Definition at line 22 of file sha256.cpp.
#define MAJ | ( | x, | |
y, | |||
z | |||
) | ( ((x)&(y)) ^ ((x)&(z)) ^ ((y)&(z)) ) |
Definition at line 23 of file sha256.cpp.
#define ROTR | ( | n, | |
x | |||
) | ( ((x)>>(n)) | ((x)<<(32-(n))) ) |
Definition at line 20 of file sha256.cpp.
#define SHR | ( | n, | |
x | |||
) | ((x)>>(n)) |
Definition at line 21 of file sha256.cpp.
Definition at line 26 of file sha256.cpp.
Definition at line 27 of file sha256.cpp.
uint32_t init256[8] |
Definition at line 33 of file sha256.cpp.
uint32_t K256[64] |
Definition at line 41 of file sha256.cpp.