|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Small dependency-free SHA-256 utility for persistent metadata identity. More...
#include <petscsys.h>#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | PicurvSHA256Context |
| Incremental SHA-256 state. More... | |
Functions | |
| void | PicurvSHA256Init (PicurvSHA256Context *context) |
| Initialize an incremental SHA-256 calculation. | |
| void | PicurvSHA256Update (PicurvSHA256Context *context, const void *data, size_t length) |
| Add bytes to an incremental SHA-256 calculation. | |
| void | PicurvSHA256FinalHex (PicurvSHA256Context *context, char digest_hex[65]) |
| Finish a SHA-256 calculation and return a lowercase hexadecimal digest. | |
| PetscErrorCode | PicurvSHA256File (const char *path, char digest_hex[65]) |
| Compute the lowercase SHA-256 digest of a file. | |
Small dependency-free SHA-256 utility for persistent metadata identity.
Definition in file checksum.h.
| struct PicurvSHA256Context |
Incremental SHA-256 state.
Definition at line 14 of file checksum.h.
| Data Fields | ||
|---|---|---|
| uint32_t | state[8] | |
| uint64_t | bit_count | |
| unsigned char | buffer[64] | |
| size_t | buffer_size | |
| void PicurvSHA256Init | ( | PicurvSHA256Context * | context | ) |
Initialize an incremental SHA-256 calculation.
| [out] | context | Hash state to initialize. |
Initialize an incremental SHA-256 calculation.
Definition at line 62 of file checksum.c.
| void PicurvSHA256Update | ( | PicurvSHA256Context * | context, |
| const void * | data, | ||
| size_t | length | ||
| ) |
Add bytes to an incremental SHA-256 calculation.
| [in,out] | context | Active hash state. |
| [in] | data | Bytes to add. |
| [in] | length | Number of bytes to add. |
Add bytes to an incremental SHA-256 calculation.
Definition at line 74 of file checksum.c.
| void PicurvSHA256FinalHex | ( | PicurvSHA256Context * | context, |
| char | digest_hex[65] | ||
| ) |
Finish a SHA-256 calculation and return a lowercase hexadecimal digest.
| [in,out] | context | Active hash state. |
| [out] | digest_hex | Null-terminated 64-character lowercase digest. |
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] | ||
| ) |
Compute the lowercase SHA-256 digest of a file.
| [in] | path | File to hash. |
| [out] | digest_hex | Null-terminated 64-character lowercase digest. |
Compute the lowercase SHA-256 digest of a file.
Definition at line 130 of file checksum.c.