/*
 * 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: Mar 17, 2016
 * Author: Oleksandr Usatov <o.usatov@samsung.com>
 * Brief: Log defines to print to kernel log
 */
#ifndef TIGERLOGGING_H
#define TIGERLOGGING_H

#include <stdio.h>

#include "ta_logger.h"

#include "TzwStorage.h"
#include "TigerKeyDataStore.h"

/**
 * @brief Log TEE_object to kernel log with DEBUG tag.
 * @param[in] object - handle on a cryptographic object.
 */
void logObject(TzwSfsObject_t object);

/**
 * @brief Prints byte-array base 64 string format.
 * @param[in] ba - pointer to byte-array.
 * @param[in] length - size of byte-array.
 * @param[in] label - label message or NULL.
 */
void logByteArrayBase64(const uint8_t* ba, size_t length, const char* label);

/**
 * @brief Prints mbed TLS error code in string representation,
 * @param[in] errorCode - error code.
 * @param[in] extraMessage - extra message, it's useful to pass function name.
 */
void logMbedtlsError(int errorCode, const char* const extraMessage);

void logRsaKeyPair(TigerKeyPair_t* keyPair, const char* alias);

#endif // TIGERLOGGING_H
