]> git.proxmox.com Git - mirror_qemu.git/blame - include/qemu/crc32c.h
Merge tag 'pull-loongarch-20231221' of https://gitlab.com/gaosong/qemu into staging
[mirror_qemu.git] / include / qemu / crc32c.h
CommitLineData
8e1b02b8
JC
1/*
2 * Castagnoli CRC32C Checksum Algorithm
3 *
4 * Polynomial: 0x11EDC6F41
5 *
6 * Castagnoli93: Guy Castagnoli and Stefan Braeuer and Martin Herrman
7 * "Optimization of Cyclic Redundancy-Check Codes with 24
8 * and 32 Parity Bits",IEEE Transactions on Communication,
9 * Volume 41, Number 6, June 1993
10 *
11 * Copyright (c) 2013 Red Hat, Inc.,
12 *
13 * Authors:
14 * Jeff Cody <jcody@redhat.com>
15 *
16 * Based on the Linux kernel cryptographic crc32c module,
17 *
18 * Copyright (c) 2004 Cisco Systems, Inc.
19 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
20 *
21 * This program is free software; you can redistribute it and/or modify it
22 * under the terms of the GNU General Public License as published by the Free
23 * Software Foundation; either version 2 of the License, or (at your option)
24 * any later version.
25 *
26 */
27
0956ff5a
WN
28#ifndef QEMU_CRC32C_H
29#define QEMU_CRC32C_H
8e1b02b8 30
8e1b02b8
JC
31
32uint32_t crc32c(uint32_t crc, const uint8_t *data, unsigned int length);
907209e3 33uint32_t iov_crc32c(uint32_t crc, const struct iovec *iov, size_t iov_cnt);
8e1b02b8
JC
34
35#endif