Andrzej Kurek | 9df2b41 | 2020-08-07 11:34:21 -0400 | [diff] [blame] | 1 | /* |
| 2 | * CRC-16/ARC implementation, generated using pycrc v0.9.2, https://pycrc.org. |
| 3 | * |
| 4 | * Used options: --model=crc-16 --algorithm=tbl --generate=h --std=C89 --table-idx-width 4 |
| 5 | * |
| 6 | * Copyright (C) 2006-2020, ARM Limited, All Rights Reserved |
| 7 | * SPDX-License-Identifier: Apache-2.0 |
| 8 | * |
| 9 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 10 | * not use this file except in compliance with the License. |
| 11 | * You may obtain a copy of the License at |
| 12 | * |
| 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | * |
| 15 | * Unless required by applicable law or agreed to in writing, software |
| 16 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | * See the License for the specific language governing permissions and |
| 19 | * limitations under the License. |
| 20 | * |
| 21 | * This file is part of mbed TLS (https://tls.mbed.org) |
| 22 | */ |
| 23 | |
| 24 | #ifndef MBEDTLS_CRC_H |
| 25 | #define MBEDTLS_CRC_H |
| 26 | |
| 27 | #include <stdlib.h> |
| 28 | #include <stdint.h> |
| 29 | |
| 30 | #ifdef __cplusplus |
| 31 | extern "C" { |
| 32 | #endif |
| 33 | |
| 34 | /** |
| 35 | * Update the crc value with new data. |
| 36 | * |
| 37 | * \param[in] crc The current crc value. |
| 38 | * \param[in] data Pointer to a buffer of \a data_len bytes. |
| 39 | * \param[in] data_len Number of bytes in the \a data buffer. |
| 40 | * \return The updated crc value. |
| 41 | */ |
| 42 | uint16_t mbedtls_crc_update( uint16_t crc, const void *data, size_t data_len ); |
| 43 | |
| 44 | #ifdef __cplusplus |
| 45 | } |
| 46 | #endif |
| 47 | #endif /* MBEDTLS_CRC_H */ |