diff options
author | Rob Austein <sra@hactrn.net> | 2015-12-13 00:43:11 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-12-13 00:43:11 -0500 |
commit | c60b4bbd62865c4fe891dcbf7586c4718082d626 (patch) | |
tree | c7a4e2ba247241df3b3fecd79cee197c84646881 /hal.h | |
parent | 6f479d8615a60e94b3c19e090a4eba8a0256ec32 (diff) |
Add rpc_hash.c. Convert dynamic allocator in hash.c to use private
pool of pre-configured state blocks, suitable for an embedded system.
Diffstat (limited to 'hal.h')
-rw-r--r-- | hal.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -221,7 +221,17 @@ typedef struct hal_hash_driver hal_hash_driver_t; * problem. */ +typedef enum { + hal_digest_algorithm_sha1, + hal_digest_algorithm_sha256, + hal_digest_algorithm_sha512_224, + hal_digest_algorithm_sha512_256, + hal_digest_algorithm_sha384, + hal_digest_algorithm_sha512 +} hal_digest_algorithm_t; + typedef struct { + hal_digest_algorithm_t digest_algorithm; size_t block_length; size_t digest_length; size_t hash_state_length; @@ -284,6 +294,10 @@ extern void hal_hash_cleanup(hal_hash_state_t **state); extern void hal_hmac_cleanup(hal_hmac_state_t **state); +extern const hal_hash_descriptor_t *hal_hash_get_descriptor(const hal_hash_state_t * const state); + +extern const hal_hash_descriptor_t *hal_hmac_get_descriptor(const hal_hmac_state_t * const state); + /* * AES key wrap functions. */ |