CryptoAuthLib
Microchip CryptoAuthentication Library
|
Software implementation of the SHA256 algorithm. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | sw_sha256_ctx |
Macros | |
#define | SHA256_DIGEST_SIZE (32) |
#define | SHA256_BLOCK_SIZE (64) |
Functions | |
void | sw_sha256_init (sw_sha256_ctx *ctx) |
Intialize the software SHA256. More... | |
void | sw_sha256_update (sw_sha256_ctx *ctx, const uint8_t *message, uint32_t len) |
updates the running hash with the next block of data, called iteratively for the entire stream of data to be hashed using the SHA256 software More... | |
void | sw_sha256_final (sw_sha256_ctx *ctx, uint8_t digest[SHA256_DIGEST_SIZE]) |
completes the final SHA256 calculation and returns the final digest/hash More... | |
void | sw_sha256 (const uint8_t *message, unsigned int len, uint8_t digest[SHA256_DIGEST_SIZE]) |
single call convenience function which computes Hash of given data using SHA256 software More... | |
Software implementation of the SHA256 algorithm.
#define SHA256_BLOCK_SIZE (64) |
#define SHA256_DIGEST_SIZE (32) |
void sw_sha256 | ( | const uint8_t * | message, |
unsigned int | len, | ||
uint8_t | digest[SHA256_DIGEST_SIZE] | ||
) |
single call convenience function which computes Hash of given data using SHA256 software
[in] | message | pointer to stream of data to hash |
[in] | len | size of data stream to hash |
[out] | digest | result |
void sw_sha256_final | ( | sw_sha256_ctx * | ctx, |
uint8_t | digest[SHA256_DIGEST_SIZE] | ||
) |
completes the final SHA256 calculation and returns the final digest/hash
[in] | ctx | ptr to context data structure |
[out] | digest | receives the computed digest of the SHA 256 |
void sw_sha256_init | ( | sw_sha256_ctx * | ctx | ) |
Intialize the software SHA256.
[in] | ctx | SHA256 hash context |
void sw_sha256_update | ( | sw_sha256_ctx * | ctx, |
const uint8_t * | msg, | ||
uint32_t | msg_size | ||
) |
updates the running hash with the next block of data, called iteratively for the entire stream of data to be hashed using the SHA256 software
[in] | ctx | SHA256 hash context |
[in] | msg | Raw blocks to be processed |
[in] | msg_size | The size of the message passed |