|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include "decls.h"#include "sha256.h"Go to the source code of this file.
Macros | |
| #define | AARU_LOCAL static |
| #define | ROTR32(x, n) |
| #define | Ch(x, y, z) |
| #define | Maj(x, y, z) |
| #define | SIGMA0(x) |
| #define | SIGMA1(x) |
| #define | sigma0(x) |
| #define | sigma1(x) |
Functions | |
| static void | sha256_transform (uint32_t state[8], const uint8_t block[64]) |
| void | aaruf_sha256_init (sha256_ctx *ctx) |
| void | aaruf_sha256_update (sha256_ctx *ctx, const void *data_ptr, unsigned long len) |
| void | aaruf_sha256_final (sha256_ctx *ctx, unsigned char *out) |
| void | aaruf_sha256_buffer (const void *data, unsigned long size, unsigned char *result) |
Variables | |
| static const uint32_t | K [64] |
| #define Ch | ( | x, | |
| y, | |||
| z ) |
Definition at line 24 of file sha256.c.
Referenced by sha256_transform().
| #define Maj | ( | x, | |
| y, | |||
| z ) |
Definition at line 25 of file sha256.c.
Referenced by sha256_transform().
| #define ROTR32 | ( | x, | |
| n ) |
| #define SIGMA0 | ( | x | ) |
| #define sigma0 | ( | x | ) |
Definition at line 28 of file sha256.c.
Referenced by sha256_transform().
| #define SIGMA1 | ( | x | ) |
| #define sigma1 | ( | x | ) |
Definition at line 29 of file sha256.c.
Referenced by sha256_transform().
| void aaruf_sha256_buffer | ( | const void * | data, |
| unsigned long | size, | ||
| unsigned char * | result ) |
Definition at line 141 of file sha256.c.
References AARU_CALL, AARU_EXPORT, aaruf_sha256_final(), aaruf_sha256_init(), and aaruf_sha256_update().
| void aaruf_sha256_final | ( | sha256_ctx * | ctx, |
| unsigned char * | out ) |
Definition at line 115 of file sha256.c.
References AARU_CALL, AARU_EXPORT, aaruf_sha256_update(), sha256_ctx::bitcount, sha256_ctx::buffer, and sha256_ctx::state.
Referenced by aaruf_sha256_buffer(), and write_checksum_block().
| void aaruf_sha256_init | ( | sha256_ctx * | ctx | ) |
Definition at line 76 of file sha256.c.
References AARU_CALL, AARU_EXPORT, sha256_ctx::bitcount, sha256_ctx::buffer, and sha256_ctx::state.
Referenced by aaruf_create(), and aaruf_sha256_buffer().
| void aaruf_sha256_update | ( | sha256_ctx * | ctx, |
| const void * | data_ptr, | ||
| unsigned long | len ) |
Definition at line 90 of file sha256.c.
References AARU_CALL, AARU_EXPORT, sha256_ctx::bitcount, sha256_ctx::buffer, sha256_transform(), and sha256_ctx::state.
Referenced by aaruf_sha256_buffer(), aaruf_sha256_final(), aaruf_write_sector(), and aaruf_write_sector_long().
|
static |
|
static |
Definition at line 31 of file sha256.c.
Referenced by sha256_transform().