CTS-SAT-1-OBC-Firmware
|
#include "littlefs/littlefs_checksums.h"
#include "littlefs/lfs.h"
#include "littlefs/littlefs_helper.h"
#include "crypto/sha256.h"
#include "log/log.h"
#include "debug_tools/debug_uart.h"
Functions | |
int8_t | LFS_read_file_checksum_sha256 (const char filepath[], uint32_t start_offset, uint32_t max_length, uint8_t sha256_dest[32]) |
Computes the SHA256 checksum of a file in LittleFS. | |
int8_t LFS_read_file_checksum_sha256 | ( | const char | filepath[], |
uint32_t | start_offset, | ||
uint32_t | max_length, | ||
uint8_t | sha256_dest[32] ) |
Computes the SHA256 checksum of a file in LittleFS.
filepath | Path to the file to read and compute the checksum for. |
start_offset | The offset in the file from which to start reading. |
max_length | The maximum number of bytes to read from the file. 0 means read the entire file. |
sha256_dest | 32-byte array to be filled with checksum. |