rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmio/crc.h
Go to the documentation of this file.

    00001
    00005 #include <sys/types.h>
    00006 #include <rpmiotypes.h>
    00007
    00008 #ifndef  _CRC_H
    00009 #define  _CRC_H
    00010
    00013 typedef struct {
    00014     rpmuint32_t crc;
    00015     rpmuint32_t (*update)  (rpmuint32_t crc, const rpmuint8_t * data, size_t size);
    00016     rpmuint32_t (*combine) (rpmuint32_t crc1, rpmuint32_t crc2, size_t len2);
    00017 } sum32Param;
    00018
    00021 typedef struct {
    00022     rpmuint64_t crc;
    00023     rpmuint64_t (*update)  (rpmuint64_t crc, const rpmuint8_t * data, size_t size);
    00024     rpmuint64_t (*combine) (rpmuint64_t crc1, rpmuint64_t crc2, size_t len2);
    00025 } sum64Param;
    00026
    00027 #ifdef __cplusplus
    00028 extern "C" {
    00029 #endif
    00030
    00033 rpmuint32_t __crc32(rpmuint32_t crc, const rpmuint8_t * data, size_t size)
    00034         /*@*/;
    00035
    00038 rpmuint32_t __crc32_combine(rpmuint32_t crc1, rpmuint32_t crc2, size_t len2)
    00039         /*@*/;
    00040
    00043 rpmuint64_t __crc64(rpmuint64_t crc, const rpmuint8_t * data, size_t size)
    00044         /*@*/;
    00045
    00048 rpmuint64_t __crc64_combine(rpmuint64_t crc1, rpmuint64_t crc2, size_t len2)
    00049         /*@*/;
    00050
    00053 rpmuint32_t __adler32(rpmuint32_t adler, const rpmuint8_t * buf, rpmuint32_t len)
    00054         /*@*/;
    00055
    00058 rpmuint32_t __adler32_combine(rpmuint32_t adler1, rpmuint32_t adler2, size_t len2)
    00059         /*@*/;
    00060
    00063 int sum32Reset(sum32Param * mp)
    00064         /*@modifies *mp @*/;
    00065
    00068 int sum32Update(sum32Param * mp, const rpmuint8_t * data, size_t size)
    00069         /*@modifies *mp @*/;
    00070
    00073 int sum32Digest(sum32Param * mp, rpmuint8_t * data)
    00074         /*@modifies *mp, data @*/;
    00075
    00078 int sum64Reset(sum64Param * mp)
    00079         /*@modifies *mp @*/;
    00080
    00083 int sum64Update(sum64Param * mp, const rpmuint8_t * data, size_t size)
    00084         /*@modifies *mp @*/;
    00085
    00088 int sum64Digest(sum64Param * mp, rpmuint8_t * data)
    00089         /*@modifies *mp, data @*/;
    00090
    00091 #ifdef __cplusplus
    00092 }
    00093 #endif
    00094
    00095 #endif  /* _CRC_H */