Structure of SHA-256 drivers.
More...
#include <os/lib/sha-256.h>
|
|
void(* | init )(void) |
| | Starts a hash session.
|
| |
| void(* | update )(const uint8_t *data, size_t len) |
| | Processes a chunk of data.
|
| |
| void(* | finalize )(uint8_t digest[static 32]) |
| | Terminates the hash session and produces the digest.
|
| |
|
void(* | create_checkpoint )(sha_256_checkpoint_t *checkpoint) |
| | Saves the hash session, e.g., before pausing a protothread.
|
| |
|
void(* | restore_checkpoint )(const sha_256_checkpoint_t *checkpoint) |
| | Restores a hash session, e.g., after resuming a protothread.
|
| |
| void(* | hash )(const uint8_t *data, size_t len, uint8_t digest[static 32]) |
| | Does init, update, and finalize at once.
|
| |
Structure of SHA-256 drivers.
Definition at line 69 of file sha-256.h.
◆ finalize
| void(* sha_256_driver::finalize) (uint8_t digest[static 32]) |
Terminates the hash session and produces the digest.
- Parameters
-
| digest | pointer to the hash value |
Definition at line 87 of file sha-256.h.
◆ hash
| void(* sha_256_driver::hash) (const uint8_t *data, size_t len, uint8_t digest[static 32]) |
Does init, update, and finalize at once.
- Parameters
-
| data | pointer to the data to hash |
| len | length of the data to hash in bytes |
| digest | pointer to the hash value |
Definition at line 105 of file sha-256.h.
◆ update
| void(* sha_256_driver::update) (const uint8_t *data, size_t len) |
Processes a chunk of data.
- Parameters
-
| data | pointer to the data to hash |
| len | length of the data to hash in bytes |
Definition at line 81 of file sha-256.h.