/*
 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Created in Samsung Ukraine R&D Center (SRK) under a contract between
 * LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine)
 * and "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
 *
 * Created on: Jul 1, 2016
 * Author: Oleksii Kachkan <o.kachkan@samsung.com>
 * Brief: Module that responds for communication with RPMB.
 */

#ifndef TIGERRPMB_H_
#define TIGERRPMB_H_

#include "TzwCommon.h"

/**
 * @brief Save data to RPMB
 * @param[in] data - buffer, contains data to be saved oin RPMB.
 * @param[in] dataSize - buffer size.
 * @return status of the operation, e.g. TEE_SUCCESS on success.
 */
TEE_Result rpmbWrite(IN const uint8_t* data, const uint32_t dataSize);

/**
 * @brief Read data from RPMB
 * @param[in, out] buffer - pointer to allocated buffer.
 * @param[in, out] bufferSize - buffer size. normally MAX_EXPORT_SIZE_BYTES
 * @return status of the operation, e.g. TEE_SUCCESS on success.
 */
TEE_Result rpmbRead(IN OUT uint8_t* buffer, const uint32_t bufferSize);

/**
 * @brief Remove data from RPMB
 * @return status of the operation, e.g. TEE_SUCCESS on success.
 */
TEE_Result rpmbClear();

#endif
