Mistake on this page?
Report an issue in GitHub or email us
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  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef CALC128_H
25 #define CALC128_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WSF_UTIL_API
32  * \{ */
33 
34 /**************************************************************************************************
35  Macros
36 **************************************************************************************************/
37 
38 /*! \brief 128-bit integer length in bytes */
39 #define CALC128_LEN 16
40 
41 /**************************************************************************************************
42  Global Variables
43 **************************************************************************************************/
44 
45 /*! \brief 128-bit zero value */
46 extern const uint8_t calc128Zeros[CALC128_LEN];
47 
48 /**************************************************************************************************
49  Function Declarations
50 **************************************************************************************************/
51 
52 /*************************************************************************************************/
53 /*!
54  * \brief Copy a 128-bit integer from source to destination.
55  *
56  * \param pDst Pointer to destination.
57  * \param pSrc Pointer to source.
58  */
59 /*************************************************************************************************/
60 void Calc128Cpy(uint8_t *pDst, uint8_t *pSrc);
61 
62 /*************************************************************************************************/
63 /*!
64  * \brief Copy a 64-bit integer from source to destination.
65  *
66  * \param pDst Pointer to destination.
67  * \param pSrc Pointer to source.
68  */
69 /*************************************************************************************************/
70 void Calc128Cpy64(uint8_t *pDst, uint8_t *pSrc);
71 
72 /*************************************************************************************************/
73 /*!
74  * \brief Exclusive-or two 128-bit integers and return the result in pDst.
75  *
76  * \param pDst Pointer to destination.
77  * \param pSrc Pointer to source.
78  */
79 /*************************************************************************************************/
80 void Calc128Xor(uint8_t *pDst, uint8_t *pSrc);
81 
82 /*! \} */ /* WSF_UTIL_API */
83 
84 #ifdef __cplusplus
85 };
86 #endif
87 
88 #endif /* CALC128_H */
void Calc128Cpy64(uint8_t *pDst, uint8_t *pSrc)
Copy a 64-bit integer from source to destination.
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.
const uint8_t calc128Zeros[16]
128-bit zero value
#define CALC128_LEN
128-bit integer length in bytes
Definition: calc128.h:39
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.