/**
 * @file uuid_utils.h
 * @brief Multibuild's UUID-related utils declarations
 * @author Iaroslav Makarchuk (i.makarchuk@samsung.com)
 * @date Created Oct 3, 2016
 * @par In Samsung Ukraine R&D Center (SURC) under a contract between
 * @par LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and
 * @par "Samsung Elecrtronics Co", Ltd (Seoul, Republic of Korea)
 * @par Copyright: (c) Samsung Electronics Co, Ltd 2015. All rights reserved.
 *
 * This software is proprietary of Samsung Electronics.
 * No part of this software, either material or conceptual may be copied
 * or distributed, transmitted, transcribed, stored in a retrieval system
 * or translated into any human or computer language in any form by any means,
 * electronic, mechanical, manual or otherwise, or disclosed to third parties
 * without the express written permission of Samsung Electronics.
 */

#ifndef MB_UUID_UTILS_H_
#define MB_UUID_UTILS_H_

#include <tee_internal_api.h>

/**
 * @brief Converts TEE_UUID into properly ordered byte array
 *
 * @note The function converts TEE_UUID structure into the properly ordered byte
 * array regardless of endianess.
 *
 * @param[in]      tee_uuid   A pointer to TEE_UUID structure to be converted
 * @param[out]     uuid       A pointer to output byte array
 * @param[in]      uuid_len   A length of output byte array buffer to be filled
 *
 * @retval TEE_SUCCESS              Successful conversion
 * @retval TEE_ERROR_BAD_PARAMETERS uuid_len is too short
 */
TEE_Result TeeUuidToUuid(const TEE_UUID *tee_uuid,
                         uint8_t *uuid, uint32_t uuid_len);

#endif /* MB_UUID_UTILS_H_ */
