1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2014, STMicroelectronics International N.V.
4  */
5 
6 #ifndef XTEST_UUID_HELPERS_H
7 #define XTEST_UUID_HELPERS_H
8 
9 #include <tee_api_defines.h>
10 #include <tee_api_types.h>
11 #include <tee_api_compat.h>
12 
13 /*
14  * Convert a UUID string @s into a TEEC_UUID @uuid
15  * Expected format for @s is: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
16  * 'x' being any hexadecimal digit (0-9a-fA-F)
17  */
18 TEEC_Result xtest_uuid_from_str(TEEC_UUID *uuid, const char *s);
19 
20 #ifdef OPENSSL_FOUND
21 /*
22  * Form UUIDv5 from given name space and name.
23  */
24 TEEC_Result xtest_uuid_v5(TEEC_UUID *uuid, const TEEC_UUID *ns,
25 			  const void *name, size_t size);
26 #endif /*OPENSSL_FOUND*/
27 #endif
28