Mistake on this page?
Report an issue in GitHub or email us
crc32.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file crc32.h
4  *
5  * \brief CRC-32 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 CRC32_H
25 #define CRC32_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WSF_UTIL_API
32  * \{ */
33 
34 /*************************************************************************************************/
35 /*!
36  * \brief Calculate the CRC-32 of the given buffer.
37  *
38  * \param crcInit Initial value of the CRC.
39  * \param len Length of the buffer.
40  * \param pBuf Buffer to compute the CRC.
41  *
42  * This routine was originally generated with crcmod.py using the following parameters:
43  * - polynomial 0x104C11DB7
44  * - bit reverse algorithm
45  */
46 /*************************************************************************************************/
47 uint32_t CalcCrc32(uint32_t crcInit, uint32_t len, const uint8_t *pBuf);
48 
49 /*! \} */ /* WSF_UTIL_API */
50 
51 #ifdef __cplusplus
52 };
53 #endif
54 
55 #endif /* CRC32_H */
uint32_t CalcCrc32(uint32_t crcInit, uint32_t len, const uint8_t *pBuf)
Calculate the CRC-32 of the given buffer.
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.