Zephyr Project API 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
fs_mgmt_hash_checksum.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/fs/fs.h>

Go to the source code of this file.

Data Structures

struct  fs_mgmt_hash_checksum_group
 A collection of handlers for an entire hash/checksum group. More...
 

Typedefs

typedef int(* fs_mgmt_hash_checksum_handler_fn) (struct fs_file_t *file, uint8_t *output, size_t *out_len, size_t len)
 Function that gets called to generate a hash or checksum.
 
typedef void(* fs_mgmt_hash_checksum_list_cb) (const struct fs_mgmt_hash_checksum_group *group, void *user_data)
 Function that gets called with hash/checksum details.
 

Functions

void fs_mgmt_hash_checksum_register_group (struct fs_mgmt_hash_checksum_group *group)
 Registers a full hash/checksum group.
 
void fs_mgmt_hash_checksum_unregister_group (struct fs_mgmt_hash_checksum_group *group)
 Unregisters a full hash/checksum group.
 
const struct fs_mgmt_hash_checksum_groupfs_mgmt_hash_checksum_find_handler (const char *name)
 Finds a registered hash/checksum handler.
 
void fs_mgmt_hash_checksum_find_handlers (fs_mgmt_hash_checksum_list_cb cb, void *user_data)
 Runs a callback with all supported hash/checksum types.
 

Typedef Documentation

◆ fs_mgmt_hash_checksum_handler_fn

fs_mgmt_hash_checksum_handler_fn

Function that gets called to generate a hash or checksum.

Parameters
fileOpened file context
outputOutput buffer for hash/checksum
out_lenUpdated with size of input data
lenMaximum length of data to perform hash/checksum on
Returns
0 on success, negative error code on failure.

◆ fs_mgmt_hash_checksum_list_cb

fs_mgmt_hash_checksum_list_cb

Function that gets called with hash/checksum details.

Parameters
groupDetails about a supported hash/checksum
user_dataUser-supplied value to calling function

Function Documentation

◆ fs_mgmt_hash_checksum_find_handler()

const struct fs_mgmt_hash_checksum_group * fs_mgmt_hash_checksum_find_handler ( const char *  name)

Finds a registered hash/checksum handler.

Parameters
nameThe name of the hash/checksum group to find.
Returns
The requested hash/checksum handler on success; NULL on failure.

◆ fs_mgmt_hash_checksum_find_handlers()

void fs_mgmt_hash_checksum_find_handlers ( fs_mgmt_hash_checksum_list_cb  cb,
void *  user_data 
)

Runs a callback with all supported hash/checksum types.

Parameters
cbThe callback function to call with each hash/checksum type.
user_dataData to pass back with the callback function.

◆ fs_mgmt_hash_checksum_register_group()

void fs_mgmt_hash_checksum_register_group ( struct fs_mgmt_hash_checksum_group group)

Registers a full hash/checksum group.

Parameters
groupThe group to register.

◆ fs_mgmt_hash_checksum_unregister_group()

void fs_mgmt_hash_checksum_unregister_group ( struct fs_mgmt_hash_checksum_group group)

Unregisters a full hash/checksum group.

Parameters
groupThe group to register.