diff options
author | Rob Austein <sra@hactrn.net> | 2016-09-02 01:31:17 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-09-02 01:31:17 -0400 |
commit | 5af178dee33b22cf189c085e41ca96423f809034 (patch) | |
tree | 6748c02763287ad1711f0e369256c063b649549f /hal_internal.h | |
parent | 65e8ef470b34a9c7af92f377da297095a0251890 (diff) |
Code to convert between text and internal forms of UUIDs.
Includes a few cosmetic fixes to address gcc format string warnings
and git trailing whitespace warnings.
Diffstat (limited to 'hal_internal.h')
-rw-r--r-- | hal_internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hal_internal.h b/hal_internal.h index 72f326c..ef00328 100644 --- a/hal_internal.h +++ b/hal_internal.h @@ -258,6 +258,8 @@ extern hal_error_t hal_rpc_pkcs1_construct_digestinfo(const hal_hash_handle_t ha * UUID stuff. All UUIDs we use (or are likely to use) are type 4 "random" UUIDs */ +#define HAL_UUID_TEXT_SIZE (sizeof("00112233-4455-6677-8899-aabbccddeeff")) + static inline int hal_uuid_cmp(const hal_uuid_t * const a, const hal_uuid_t * const b) { return memcmp(a, b, sizeof(hal_uuid_t)); @@ -265,6 +267,10 @@ static inline int hal_uuid_cmp(const hal_uuid_t * const a, const hal_uuid_t * co extern hal_error_t hal_uuid_gen(hal_uuid_t *uuid); +extern hal_error_t hal_uuid_parse(hal_uuid_t *uuid, const char * const string); + +extern hal_error_t hal_uuid_format(const hal_uuid_t * const uuid, char *buffer, const size_t buffer_len); + /* * Keystore API. */ |