|
Data Structures |
struct | sha256_state |
Defines |
#define | CRYPT_OK 0 |
#define | CRYPT_NOP -1 |
#define | CRYPT_INVALID_ARG -2 |
#define | LOAD32H(x, y) STMT_BEGIN x = ntohl(get_uint32((const char*)y)); STMT_END |
#define | STORE32H(x, y) STMT_BEGIN set_uint32((char*)y, htonl(x)); STMT_END |
#define | STORE64H(x, y) |
#define | RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL) |
#define | MIN(x, y) ( ((x)<(y))?(x):(y) ) |
#define | Ch(x, y, z) (z ^ (x & (y ^ z))) |
#define | Maj(x, y, z) (((x | y) & z) | (x & y)) |
#define | S(x, n) RORc((x),(n)) |
#define | R(x, n) (((x)&0xFFFFFFFFUL)>>(n)) |
#define | Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) |
#define | Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25)) |
#define | Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3)) |
#define | Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10)) |
#define | RND(a, b, c, d, e, f, g, h, i, ki) |
Functions |
static int | sha256_compress (sha256_state *md, unsigned char *buf) |
static int | sha256_init (sha256_state *md) |
static int | sha256_process (sha256_state *md, const unsigned char *in, unsigned long inlen) |
static int | sha256_done (sha256_state *md, unsigned char *out) |