Rizin
unix-like reverse engineering framework and cli tools
|
SHA-256. More...
#include "check.h"
Go to the source code of this file.
Macros | |
#define | blk0(i) (W[i] = conv32be(data[i])) |
#define | blk2(i) |
#define | Ch(x, y, z) (z ^ (x & (y ^ z))) |
#define | Maj(x, y, z) ((x & (y ^ z)) + (y & z)) |
#define | a(i) T[(0 - i) & 7] |
#define | b(i) T[(1 - i) & 7] |
#define | c(i) T[(2 - i) & 7] |
#define | d(i) T[(3 - i) & 7] |
#define | e(i) T[(4 - i) & 7] |
#define | f(i) T[(5 - i) & 7] |
#define | g(i) T[(6 - i) & 7] |
#define | h(i) T[(7 - i) & 7] |
#define | R(i, j, blk) |
#define | R0(i) R(i, 0, blk0(i)) |
#define | R2(i) R(i, j, blk2(i)) |
#define | S0(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 9), 11), 2) |
#define | S1(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 14), 5), 6) |
#define | s0(x) (rotr_32(x ^ rotr_32(x, 11), 7) ^ (x >> 3)) |
#define | s1(x) (rotr_32(x ^ rotr_32(x, 2), 17) ^ (x >> 10)) |
Functions | |
static uint32_t | rotr_32 (uint32_t num, unsigned amount) |
static void | transform (uint32_t state[8], const uint32_t data[16]) |
static void | process (lzma_check_state *check) |
void | lzma_sha256_init (lzma_check_state *check) |
Prepare SHA-256 state for new input. More... | |
void | lzma_sha256_update (const uint8_t *buf, size_t size, lzma_check_state *check) |
Update the SHA-256 hash state. More... | |
void | lzma_sha256_finish (lzma_check_state *check) |
Finish the SHA-256 calculation and store the result to check->buffer.u8. More... | |
Variables | |
static const uint32_t | SHA256_K [64] |
SHA-256.
Definition in file sha256.c.
#define blk2 | ( | i | ) |
#define R | ( | i, | |
j, | |||
blk | |||
) |
void lzma_sha256_finish | ( | lzma_check_state * | check | ) |
void lzma_sha256_init | ( | lzma_check_state * | check | ) |
void lzma_sha256_update | ( | const uint8_t * | buf, |
size_t | size, | ||
lzma_check_state * | check | ||
) |
|
static |
Definition at line 119 of file sha256.c.
References check, and transform().
Referenced by lzma_sha256_finish(), and lzma_sha256_update().
Definition at line 29 of file sha256.c.
References num.