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) ROR64c(x, n) |
#define | R(x, n) (((x)&CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)n)) |
#define | Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39)) |
#define | Sigma1(x) (S(x, 14) ^ S(x, 18) ^ S(x, 41)) |
#define | Gamma0(x) (S(x, 1) ^ S(x, 8) ^ R(x, 7)) |
#define | Gamma1(x) (S(x, 19) ^ S(x, 61) ^ R(x, 6)) |
#define | RND(a, b, c, d, e, f, g, h, i) |
Functions | |
static void | sha512_compress (sha512_context *md, const uint8_t *buf) |
void | sha512_init (sha512_context *md) |
void | sha512_process (sha512_context *md, const uint8_t *in, size_t inlen) |
void | sha512_done (sha512_context *md, uint8_t *out) |
void | sha512_hash (const uint8_t *data, size_t len, uint8_t *digest) |
Variables | |
static const uint64_t | K [80] |
#define Ch | ( | x, | |
y, | |||
z | |||
) | (z ^ (x & (y ^ z))) |
#define Maj | ( | x, | |
y, | |||
z | |||
) | (((x | y) & z) | (x & y)) |
#define S | ( | x, | |
n | |||
) | ROR64c(x, n) |
#define R | ( | x, | |
n | |||
) | (((x)&CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)n)) |
#define RND | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i | |||
) |
|
static |
void sha512_init | ( | sha512_context * | md | ) |
void sha512_process | ( | sha512_context * | md, |
const uint8_t * | in, | ||
size_t | inlen | ||
) |
void sha512_done | ( | sha512_context * | md, |
uint8_t * | out | ||
) |
void sha512_hash | ( | const uint8_t * | data, |
size_t | len, | ||
uint8_t * | digest | ||
) |
|
static |