Cordio Stack and Cordio Profiles  r2p3-02rel0
calc128.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file calc128.h
4  *
5  * \brief 128-bit integer utilities.
6  *
7  * Copyright (c) 2010-2018 Arm Ltd. All Rights Reserved.
8  * ARM Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact ARM Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 #ifndef CALC128_H
20 #define CALC128_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /*! \addtogroup WSF_UTIL_API
27  * \{ */
28 
29 /**************************************************************************************************
30  Macros
31 **************************************************************************************************/
32 
33 /*! \brief 128-bit integer length in bytes */
34 #define CALC128_LEN 16
35 
36 /**************************************************************************************************
37  Global Variables
38 **************************************************************************************************/
39 
40 /*! \brief 128-bit zero value */
41 extern const uint8_t calc128Zeros[CALC128_LEN];
42 
43 /**************************************************************************************************
44  Function Declarations
45 **************************************************************************************************/
46 
47 /*************************************************************************************************/
48 /*!
49  * \brief Copy a 128-bit integer from source to destination.
50  *
51  * \param pDst Pointer to destination.
52  * \param pSrc Pointer to source.
53  *
54  * \return None.
55  */
56 /*************************************************************************************************/
57 void Calc128Cpy(uint8_t *pDst, uint8_t *pSrc);
58 
59 /*************************************************************************************************/
60 /*!
61  * \brief Copy a 64-bit integer from source to destination.
62  *
63  * \param pDst Pointer to destination.
64  * \param pSrc Pointer to source.
65  *
66  * \return None.
67  */
68 /*************************************************************************************************/
69 void Calc128Cpy64(uint8_t *pDst, uint8_t *pSrc);
70 
71 /*************************************************************************************************/
72 /*!
73  * \brief Exclusive-or two 128-bit integers and return the result in pDst.
74  *
75  * \param pDst Pointer to destination.
76  * \param pSrc Pointer to source.
77  *
78  * \return None.
79  */
80 /*************************************************************************************************/
81 void Calc128Xor(uint8_t *pDst, uint8_t *pSrc);
82 
83 /*! \} */ /* WSF_UTIL_API */
84 
85 #ifdef __cplusplus
86 };
87 #endif
88 
89 #endif /* CALC128_H */
void Calc128Cpy64(uint8_t *pDst, uint8_t *pSrc)
Copy a 64-bit integer from source to destination.
const uint8_t calc128Zeros[CALC128_LEN]
128-bit zero value
void Calc128Xor(uint8_t *pDst, uint8_t *pSrc)
Exclusive-or two 128-bit integers and return the result in pDst.
void Calc128Cpy(uint8_t *pDst, uint8_t *pSrc)
Copy a 128-bit integer from source to destination.
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
#define CALC128_LEN
128-bit integer length in bytes
Definition: calc128.h:34