Strophe
0.10
XMPP client library
|
Macros | |
#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 void | sha256_compress (sha256_context *md, const uint8_t *buf) |
void | sha256_init (sha256_context *md) |
void | sha256_process (sha256_context *md, const uint8_t *in, size_t inlen) |
void | sha256_done (sha256_context *md, uint8_t *out) |
void | sha256_hash (const uint8_t *data, size_t len, uint8_t *digest) |
#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 RND | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i, | |||
ki | |||
) |
|
static |
void sha256_init | ( | sha256_context * | md | ) |
void sha256_process | ( | sha256_context * | md, |
const uint8_t * | in, | ||
size_t | inlen | ||
) |
void sha256_done | ( | sha256_context * | md, |
uint8_t * | out | ||
) |
void sha256_hash | ( | const uint8_t * | data, |
size_t | len, | ||
uint8_t * | digest | ||
) |