xref: /onnv-gate/usr/src/lib/libparted/common/include/parted/crc32.h (revision 9663:ace9a2ac3683)
1*9663SMark.Logan@Sun.COM /*
2*9663SMark.Logan@Sun.COM     libparted - a library for manipulating disk partitions
3*9663SMark.Logan@Sun.COM     Copyright (C) 1998-2000, 2007 Free Software Foundation, Inc.
4*9663SMark.Logan@Sun.COM 
5*9663SMark.Logan@Sun.COM     crc32.h
6*9663SMark.Logan@Sun.COM 
7*9663SMark.Logan@Sun.COM     This program is free software; you can redistribute it and/or modify
8*9663SMark.Logan@Sun.COM     it under the terms of the GNU General Public License as published by
9*9663SMark.Logan@Sun.COM     the Free Software Foundation; either version 3 of the License, or
10*9663SMark.Logan@Sun.COM     (at your option) any later version.
11*9663SMark.Logan@Sun.COM 
12*9663SMark.Logan@Sun.COM     This program is distributed in the hope that it will be useful,
13*9663SMark.Logan@Sun.COM     but WITHOUT ANY WARRANTY; without even the implied warranty of
14*9663SMark.Logan@Sun.COM     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*9663SMark.Logan@Sun.COM     GNU General Public License for more details.
16*9663SMark.Logan@Sun.COM 
17*9663SMark.Logan@Sun.COM     You should have received a copy of the GNU General Public License
18*9663SMark.Logan@Sun.COM     along with this program.  If not, see <http://www.gnu.org/licenses/>.
19*9663SMark.Logan@Sun.COM */
20*9663SMark.Logan@Sun.COM 
21*9663SMark.Logan@Sun.COM #ifndef _CRC32_H
22*9663SMark.Logan@Sun.COM #define _CRC32_H
23*9663SMark.Logan@Sun.COM 
24*9663SMark.Logan@Sun.COM #include <stdint.h>
25*9663SMark.Logan@Sun.COM 
26*9663SMark.Logan@Sun.COM /*
27*9663SMark.Logan@Sun.COM  * This computes a 32 bit CRC of the data in the buffer, and returns the CRC.
28*9663SMark.Logan@Sun.COM  * The polynomial used is 0xedb88320.
29*9663SMark.Logan@Sun.COM  */
30*9663SMark.Logan@Sun.COM 
31*9663SMark.Logan@Sun.COM extern uint32_t __efi_crc32 (const void *buf, unsigned long len,
32*9663SMark.Logan@Sun.COM 			     uint32_t seed);
33*9663SMark.Logan@Sun.COM 
34*9663SMark.Logan@Sun.COM #endif /* _CRC32_H */
35