This source file contains the implemention of the SHA512 hash algorithm and variants.
More...
|
#define | be64enc_vect(dst, src, len) memcpy((void *)dst, (const void *)src, (size_t)len) |
|
#define | be64dec_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 << (64 - n))) |
|
#define | S0(x) (ROTR(x, 28) ^ ROTR(x, 34) ^ ROTR(x, 39)) |
|
#define | S1(x) (ROTR(x, 14) ^ ROTR(x, 18) ^ ROTR(x, 41)) |
|
#define | s0(x) (ROTR(x, 1) ^ ROTR(x, 8) ^ SHR(x, 7)) |
|
#define | s1(x) (ROTR(x, 19) ^ ROTR(x, 61) ^ SHR(x, 6)) |
|
#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] |
|
|
| __FBSDID ("$FreeBSD$") |
|
void | SHA512_Init (SHA512_CTX *ctx) |
|
void | SHA512_Update (SHA512_CTX *ctx, const void *in, size_t len) |
|
void | SHA512_Final (unsigned char digest[static SHA512_DIGEST_LENGTH], SHA512_CTX *ctx) |
|
void | SHA512_224_Init (SHA512_CTX *ctx) |
|
void | SHA512_224_Update (SHA512_CTX *ctx, const void *in, size_t len) |
|
void | SHA512_224_Final (unsigned char digest[static SHA512_224_DIGEST_LENGTH], SHA512_CTX *ctx) |
|
void | SHA512_256_Init (SHA512_CTX *ctx) |
|
void | SHA512_256_Update (SHA512_CTX *ctx, const void *in, size_t len) |
|
void | SHA512_256_Final (unsigned char digest[static SHA512_256_DIGEST_LENGTH], SHA512_CTX *ctx) |
|
void | SHA384_Init (SHA384_CTX *ctx) |
|
void | SHA384_Update (SHA384_CTX *ctx, const void *in, size_t len) |
|
void | SHA384_Final (unsigned char digest[static SHA384_DIGEST_LENGTH], SHA384_CTX *ctx) |
|
This source file contains the implemention of the SHA512 hash algorithm and variants.