FFmpeg
|
#include <string.h>
#include "attributes.h"
#include "avutil.h"
#include "bswap.h"
#include "sha512.h"
#include "intreadwrite.h"
#include "mem.h"
Go to the source code of this file.
Data Structures | |
struct | AVSHA512 |
hash context More... | |
Macros | |
#define | ror(value, bits) (((value) >> (bits)) | ((value) << (64 - (bits)))) |
#define | Ch(x, y, z) (((x) & ((y) ^ (z))) ^ (z)) |
#define | Maj(z, y, x) ((((x) | (y)) & (z)) | ((x) & (y))) |
#define | Sigma0_512(x) (ror((x), 28) ^ ror((x), 34) ^ ror((x), 39)) |
#define | Sigma1_512(x) (ror((x), 14) ^ ror((x), 18) ^ ror((x), 41)) |
#define | sigma0_512(x) (ror((x), 1) ^ ror((x), 8) ^ ((x) >> 7)) |
#define | sigma1_512(x) (ror((x), 19) ^ ror((x), 61) ^ ((x) >> 6)) |
#define | blk0(i) (block[i] = AV_RB64(buffer + 8 * (i))) |
#define | blk(i) |
#define | ROUND512(a, b, c, d, e, f, g, h) |
#define | ROUND512_0_TO_15(a, b, c, d, e, f, g, h) |
#define | ROUND512_16_TO_80(a, b, c, d, e, f, g, h) |
#define | R512_0 |
#define | R512_16 |
Functions | |
struct AVSHA512 * | av_sha512_alloc (void) |
Allocate an AVSHA512 context. More... | |
static void | sha512_transform (uint64_t *state, const uint8_t buffer[128]) |
av_cold int | av_sha512_init (AVSHA512 *ctx, int bits) |
Initialize SHA-2 512 hashing. More... | |
void | av_sha512_update (AVSHA512 *ctx, const uint8_t *data, unsigned int len) |
Update hash value. More... | |
void | av_sha512_final (AVSHA512 *ctx, uint8_t *digest) |
Finish hashing and output digest value. More... | |
Variables | |
const int | av_sha512_size = sizeof(AVSHA512) |
static const uint64_t | K512 [80] |
#define Ch | ( | x, | |
y, | |||
z | |||
) | (((x) & ((y) ^ (z))) ^ (z)) |
Definition at line 93 of file sha512.c.
Referenced by sha512_transform().
#define Maj | ( | z, | |
y, | |||
x | |||
) | ((((x) | (y)) & (z)) | ((x) & (y))) |
Definition at line 94 of file sha512.c.
Referenced by sha512_transform().
Definition at line 96 of file sha512.c.
Referenced by sha512_transform().
Definition at line 97 of file sha512.c.
Referenced by sha512_transform().
Definition at line 101 of file sha512.c.
Referenced by sha512_transform().
#define blk | ( | i | ) |
#define R512_0 |
Referenced by sha512_transform().
#define R512_16 |
Referenced by sha512_transform().
Definition at line 119 of file sha512.c.
Referenced by av_sha512_update().
|
static |
Definition at line 48 of file sha512.c.
Referenced by sha512_transform().