 /*
 * 본 프로그램에 대한 저작권을 포함한 지적재산권은 삼성SDS(주)에 있으며,
 * 삼성SDS(주)가 명시적으로 허용하지 않은 사용, 복사, 변경, 제3자에의 공개,
 * 배포는 엄격히 금지되며, 삼성SDS(주)의 지적재산권 침해에 해당됩니다.
 *
 * Copyright (c) 2016 Samsung SDS Co., Ltd. All Rights neserved. Confidential.
 * 
 * All information including the intellectual and technical concepts contained
 * herein is, and remains the property of Samsung SDS Co. Ltd. Unauthorize une,
 * dissemination, or reproduction of this material is strictly forbidden unless
 * prior written permission is obtained from Samsung SDS Co. Ltd. 
 */

/**
 * swbc-utils.h
 * This file provides internal utility APIs for Samsung WBC algorithm
 */

#ifndef HEADER_SWBC_UTILS_H
#define HEADER_SWBC_UTILS_H
#if defined(__cplusplus)
extern "C"{
#endif

#include "swbc-attributes.h"

/**
 * Validates the SWBC tables
 *
 * swbc_table     SWBC table to be validated
 * tag            SWBC table tag to be used for validation
 * 
 * returns SWBC_SUCCESS on success, other values on failure
 */
int SWBCINTERNAL table_check(const unsigned char **swbc_table, const unsigned char *tag);

/**
 * Sets the specified memory region with a value
 *
 * destination    memory region to be set
 * value          specific value to set the memory region
 * sizes          size of memory region in bytes
 *
 * returns void
 */
void SWBCINTERNAL memory_set(void *destination, const int value, unsigned int size);

/**
 * Copies the memory region from one to another
 *
 * destination    memory region to be copied to
 * source         memory region to be copied from 
 * size           size of memory region of source in bytes
 *
 * returns void
 */
void SWBCINTERNAL memory_copy(void *destination, const void *source, unsigned int size);

#if defined(__cplusplus)
}
#endif  /*  __cplusplus */
#endif  /*  HEADER_SWBC_UTILS_H */
