|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Dependency-free SHA-256 implementation used for small persistent metadata. More...
Go to the source code of this file.
Macros | |
| #define | ROTATE_RIGHT(value, bits) (((value) >> (bits)) | ((value) << (32u - (bits)))) |
Functions | |
| static void | PicurvSHA256Transform (PicurvSHA256Context *context, const unsigned char block[64]) |
| Transform one complete 64-byte SHA-256 block. | |
| void | PicurvSHA256Init (PicurvSHA256Context *context) |
| Implementation of PicurvSHA256Init(). | |
| void | PicurvSHA256Update (PicurvSHA256Context *context, const void *data, size_t length) |
| Implementation of PicurvSHA256Update(). | |
| void | PicurvSHA256FinalHex (PicurvSHA256Context *context, char digest_hex[65]) |
| Implementation of PicurvSHA256FinalHex(). | |
| PetscErrorCode | PicurvSHA256File (const char *path, char digest_hex[65]) |
| Implementation of PicurvSHA256File(). | |
Variables | |
| static const uint32_t | kRoundConstants [64] |
Dependency-free SHA-256 implementation used for small persistent metadata.
Definition in file checksum.c.
| #define ROTATE_RIGHT | ( | value, | |
| bits | |||
| ) | (((value) >> (bits)) | ((value) << (32u - (bits)))) |
Definition at line 10 of file checksum.c.
|
static |
Transform one complete 64-byte SHA-256 block.
Definition at line 24 of file checksum.c.
| void PicurvSHA256Init | ( | PicurvSHA256Context * | context | ) |
Implementation of PicurvSHA256Init().
Initialize an incremental SHA-256 calculation.
Definition at line 62 of file checksum.c.
| void PicurvSHA256Update | ( | PicurvSHA256Context * | context, |
| const void * | data, | ||
| size_t | length | ||
| ) |
Implementation of PicurvSHA256Update().
Add bytes to an incremental SHA-256 calculation.
Definition at line 74 of file checksum.c.
| void PicurvSHA256FinalHex | ( | PicurvSHA256Context * | context, |
| char | digest_hex[65] | ||
| ) |
Implementation of PicurvSHA256FinalHex().
Finish a SHA-256 calculation and return a lowercase hexadecimal digest.
Definition at line 98 of file checksum.c.
| PetscErrorCode PicurvSHA256File | ( | const char * | path, |
| char | digest_hex[65] | ||
| ) |
Implementation of PicurvSHA256File().
Compute the lowercase SHA-256 digest of a file.
Definition at line 130 of file checksum.c.
|
static |
Definition at line 12 of file checksum.c.