CryptoAuthLib
Microchip CryptoAuthentication Library
atca_crypto_sw_sha1.h
Go to the documentation of this file.
1 
28 #ifndef ATCA_CRYPTO_SW_SHA1_H
29 #define ATCA_CRYPTO_SW_SHA1_H
30 
31 #include "atca_crypto_sw.h"
32 #include <stddef.h>
33 #include <stdint.h>
34 
43 #define ATCA_SHA1_DIGEST_SIZE (20)
44 
45 typedef struct
46 {
47  uint32_t pad[32];
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
55 int atcac_sw_sha1_update(atcac_sha1_ctx* ctx, const uint8_t* data, size_t data_size);
57 int atcac_sw_sha1(const uint8_t * data, size_t data_size, uint8_t digest[ATCA_SHA1_DIGEST_SIZE]);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
64 #endif
#define ATCA_SHA1_DIGEST_SIZE
Definition: atca_crypto_sw_sha1.h:43
int atcac_sw_sha1(const uint8_t *data, size_t data_size, uint8_t digest[ATCA_SHA1_DIGEST_SIZE])
Perform SHA1 hash of data in software.
Definition: atca_crypto_sw_sha1.c:82
Common defines for CryptoAuthLib software crypto wrappers.
int atcac_sw_sha1_update(atcac_sha1_ctx *ctx, const uint8_t *data, size_t data_size)
Add arbitrary data to a SHA1 hash.
Definition: atca_crypto_sw_sha1.c:56
int atcac_sw_sha1_finish(atcac_sha1_ctx *ctx, uint8_t digest[ATCA_SHA1_DIGEST_SIZE])
Complete the SHA1 hash in software and return the digest.
Definition: atca_crypto_sw_sha1.c:68
int atcac_sw_sha1_init(atcac_sha1_ctx *ctx)
Initialize context for performing SHA1 hash in software.
Definition: atca_crypto_sw_sha1.c:38
Definition: atca_crypto_sw_sha1.h:45