diff options
Diffstat (limited to 'lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h')
-rw-r--r-- | lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h b/lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h new file mode 100644 index 0000000..5bae6c1 --- /dev/null +++ b/lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (C) ST-Ericsson SA 2011 + * License terms: 3-clause BSD license + ******************************************************************************/ +#ifndef _T_SECURITY_ALGORITHMS_H_ +#define _T_SECURITY_ALGORITHMS_H_ +/** + * \addtogroup ldr_security_algorithms + * @{ + */ + +/******************************************************************************* + * Includes + ******************************************************************************/ +#include "t_basicdefinitions.h" + +/******************************************************************************* + * Types, constants + ******************************************************************************/ +/** Defined value for HASH error. */ +#define HASH_ERROR 0xffffffff + +/** Length of SHA256 algorithm results */ +#define SHA256_LENGTH 32 + +/** Length of CRC16 algorithm results */ +#define CRC16_LENGTH 2 + +/** */ +#define MAX_NR_IN_QUEUE_TOKENS 16 + +/** */ +typedef void (*HashCallback_fn)(void *Data_p, uint32 Length, uint8 *Hash_p, void *Param_p); + +/** Type of hash algorithm */ +typedef enum { + HASH_SHA256 = 0x0001, /**< 4LSB SHA-256 algorithm */ + HASH_CRC16 = 0x0002, /**< CRC16 */ + HASH_SIMPLE_XOR = 0x0003, /**< 4LSB Simple XOR algorithm */ + HASH_NONE = 0x0004 /**< Communication is not hash secured */ +} HashType_e; + +/** @} */ +#endif /*_T_SECURITY_ALGORITHMS_H_*/ |