summaryrefslogtreecommitdiff
path: root/lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h
diff options
context:
space:
mode:
authorViktor Mladenovski <viktor.mladenovski@stericsson.com>2011-05-20 14:10:59 +0200
committerViktor Mladenovski <viktor.mladenovski@stericsson.com>2011-05-20 14:10:59 +0200
commitf7e95217e936da34d7124aaced590692eb515923 (patch)
tree2d9ef4750a67d9d1dd3fe9180a4fef2929fad54b /lcmodule/source/cnh1605721_ldr_security_algorithms/include/t_security_algorithms.h
Initial contribution of loader_communication
ST-Ericsson ID: 326913 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: I171cfc2ee458a8a0a91a1916137d131f0f7ecee5
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.h44
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_*/