1 #ifndef AWS_COMMON_UUID_H
2 #define AWS_COMMON_UUID_H
3 
4 /**
5  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6  * SPDX-License-Identifier: Apache-2.0.
7  */
8 #include <aws/common/common.h>
9 
10 struct aws_byte_cursor;
11 struct aws_byte_buf;
12 
13 struct aws_uuid {
14     uint8_t uuid_data[16];
15 };
16 
17 /* 36 bytes for the UUID plus one more for the null terminator. */
18 #define AWS_UUID_STR_LEN 37
19 
20 AWS_EXTERN_C_BEGIN
21 
22 AWS_COMMON_API int aws_uuid_init(struct aws_uuid *uuid);
23 AWS_COMMON_API int aws_uuid_init_from_str(struct aws_uuid *uuid, const struct aws_byte_cursor *uuid_str);
24 AWS_COMMON_API int aws_uuid_to_str(const struct aws_uuid *uuid, struct aws_byte_buf *output);
25 AWS_COMMON_API bool aws_uuid_equals(const struct aws_uuid *a, const struct aws_uuid *b);
26 
27 AWS_EXTERN_C_END
28 
29 #endif /* AWS_COMMON_UUID_H */
30