This source file contains the implemention of the SHA256 hash algorithm and variants.
More...
|
#define | be32enc_vect(dst, src, len) memcpy((void *)dst, (const void *)src, (size_t)len) |
|
#define | be32dec_vect(dst, src, len) memcpy((void *)dst, (const void *)src, (size_t)len) |
|
#define | Ch(x, y, z) ((x & (y ^ z)) ^ z) |
|
#define | Maj(x, y, z) ((x & (y | z)) | (y & z)) |
|
#define | SHR(x, n) (x >> n) |
|
#define | ROTR(x, n) ((x >> n) | (x << (32 - n))) |
|
#define | S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) |
|
#define | S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) |
|
#define | s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3)) |
|
#define | s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10)) |
|
#define | RND(a, b, c, d, e, f, g, h, k) |
|
#define | RNDr(S, W, i, ii) |
|
#define | MSCH(W, ii, i) W[i + ii + 16] = s1(W[i + ii + 14]) + W[i + ii + 9] + s0(W[i + ii + 1]) + W[i + ii] |
|
This source file contains the implemention of the SHA256 hash algorithm and variants.