/**
 * @file       five_codes.h
 * @brief      FIVE definitions codes for Android native applications.
 *
 * @author     Viacheslav Vovchenko (v.vovchenko@samsung.com)
 * @version    1.0
 * @date       Created Oct 9, 2017
 * @copyright  In Samsung Ukraine R&D Center (SURC) under a contract between
 * @copyright  LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and
 * @copyright  "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
 * @copyright   Copyright: (c) Samsung Electronics Co, Ltd 2016. All rights reserved.
**/

#ifndef __FIVE_CODES_H__
#define __FIVE_CODES_H__

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Describe FIVE and Process Authenticator return codes
 */
typedef enum {
  FIVE_SUCCESS              = 0x00000000,   //!< The operation is completed successfully
  FIVE_GENERAL_ERROR        = 0x00010000,   //!< The operation is completed with error
} FiveResult;

/*
 * This is list of numbers which Hamming distance is 16
 *
 * 0x00000000 <-- used
 * 0x0f0f0f0f,
 * 0xf0f0f0f0,
 * 0x0000ffff,
 * 0xffff0000,
 * 0xff00ff00,
 * 0x00ff00ff,
 * 0x33333333,<-- used
 * 0xcccccccc,<-- used
 * 0x55555555,<-- used
 * 0x5a5a5a5a,<-- used
 * 0xa5a5a5a5,
 * 0xaaaaaaaa,<-- used
 * 0x3c3c3c3c,<-- used
 * 0xc3c3c3c3,
 * 0xffffffff <-- used
 */
typedef enum {
  INTEGRITY_NONE                = 0x00000000,
  INTEGRITY_PRELOAD             = 0x33333333,
  INTEGRITY_PRELOAD_ALLOW_SIGN  = 0xcccccccc,
  INTEGRITY_MIXED               = 0x55555555,
  INTEGRITY_MIXED_ALLOW_SIGN    = 0x5a5a5a5a,
  INTEGRITY_DMVERITY            = 0xaaaaaaaa,
  INTEGRITY_DMVERITY_ALLOW_SIGN = 0x3c3c3c3c,
  INTEGRITY_PROCESSING          = 0xffffffff
} FiveIntegrity;

#ifdef __cplusplus
}
#endif

#endif // __FIVE_CODES_H__
