Coly Li | feba04f | 2018-08-21 21:57:11 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * See lib/crc64.c for the related specification and polynomial arithmetic. |
| 4 | */ |
| 5 | #ifndef _LINUX_CRC64_H |
| 6 | #define _LINUX_CRC64_H |
| 7 | |
| 8 | #include <linux/types.h> |
| 9 | |
Keith Busch | f3813f4b | 2022-03-03 12:13:10 -0800 | [diff] [blame] | 10 | #define CRC64_ROCKSOFT_STRING "crc64-rocksoft" |
| 11 | |
Coly Li | feba04f | 2018-08-21 21:57:11 -0700 | [diff] [blame] | 12 | u64 __pure crc64_be(u64 crc, const void *p, size_t len); |
Keith Busch | cbc0a40 | 2022-03-03 12:13:09 -0800 | [diff] [blame] | 13 | u64 __pure crc64_rocksoft_generic(u64 crc, const void *p, size_t len); |
| 14 | |
Keith Busch | f3813f4b | 2022-03-03 12:13:10 -0800 | [diff] [blame] | 15 | u64 crc64_rocksoft(const unsigned char *buffer, size_t len); |
| 16 | u64 crc64_rocksoft_update(u64 crc, const unsigned char *buffer, size_t len); |
| 17 | |
Coly Li | feba04f | 2018-08-21 21:57:11 -0700 | [diff] [blame] | 18 | #endif /* _LINUX_CRC64_H */ |