rpm 5.2.1

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

- File List
- Globals

Data Structures | Functions
crc.h File Reference

CRC32, CRC64 and ADLER32 checksums. More...

`#include <sys/types.h>`
`#include <rpmiotypes.h>`
Include dependency graph for crc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | sum32Param
struct | sum64Param

## Functions
rpmuint32_t | __crc32 (rpmuint32_t crc, const rpmuint8_t *data, size_t size)
rpmuint32_t | __crc32_combine (rpmuint32_t crc1, rpmuint32_t crc2, size_t len2)
rpmuint64_t | __crc64 (rpmuint64_t crc, const rpmuint8_t *data, size_t size)
rpmuint64_t | __crc64_combine (rpmuint64_t crc1, rpmuint64_t crc2, size_t len2)
rpmuint32_t | __adler32 (rpmuint32_t adler, const rpmuint8_t *buf, rpmuint32_t len)
rpmuint32_t | __adler32_combine (rpmuint32_t adler1, rpmuint32_t adler2, size_t len2)
int | sum32Reset (sum32Param *mp)
int | sum32Update (sum32Param *mp, const rpmuint8_t *data, size_t size)
int | sum32Digest (sum32Param *mp, rpmuint8_t *data)
int | sum64Reset (sum64Param *mp)
int | sum64Update (sum64Param *mp, const rpmuint8_t *data, size_t size)
int | sum64Digest (sum64Param *mp, rpmuint8_t *data)

## Detailed Description

CRC32, CRC64 and ADLER32 checksums.

Definition in file crc.h.

## Function Documentation

rpmuint32_t __adler32 | ( | rpmuint32_t | adler,
|  | const rpmuint8_t * | buf,
|  | rpmuint32_t | len
| ) |  |

Definition at line 311 of file crc.c.

References BASE, DO16, MOD, MOD4, and NMAX.

Referenced by rpmDigestInit().

rpmuint32_t __adler32_combine | ( | rpmuint32_t | adler1,
|  | rpmuint32_t | adler2,
|  | size_t | len2
| ) |  |

Definition at line 378 of file crc.c.

References BASE, and MOD.

Referenced by rpmDigestInit().

rpmuint32_t __crc32 | ( | rpmuint32_t | crc,
|  | const rpmuint8_t * | data,
|  | size_t | size
| ) |  |

Definition at line 10 of file crc.c.

References crc().

Referenced by rpmDigestInit().

rpmuint32_t __crc32_combine | ( | rpmuint32_t | crc1,
|  | rpmuint32_t | crc2,
|  | size_t | len2
| ) |  |

Definition at line 79 of file crc.c.

References alloca(), gf2_dim32, gf2_matrix_square32(), and gf2_matrix_times32().

Referenced by rpmDigestInit().

rpmuint64_t __crc64 | ( | rpmuint64_t | crc,
|  | const rpmuint8_t * | data,
|  | size_t | size
| ) |  |

Definition at line 137 of file crc.c.

References crc().

Referenced by rpmDigestInit().

rpmuint64_t __crc64_combine | ( | rpmuint64_t | crc1,
|  | rpmuint64_t | crc2,
|  | size_t | len2
| ) |  |

Definition at line 207 of file crc.c.

References alloca(), gf2_dim64, gf2_matrix_square64(), and gf2_matrix_times64().

Referenced by rpmDigestInit().

int sum32Digest | ( | sum32Param * | mp,
|  | rpmuint8_t * | data
| ) |  |

Definition at line 413 of file crc.c.

References sum32Param::crc, and sum32Reset().

Referenced by rpmDigestInit().

int sum32Reset | ( | sum32Param * | mp | ) |

int sum32Update | ( | sum32Param * | mp,
|  | const rpmuint8_t * | data,
|  | size_t | size
| ) |  |

Definition at line 406 of file crc.c.

References sum32Param::crc, and sum32Param::update.

Referenced by rpmDigestInit().

int sum64Digest | ( | sum64Param * | mp,
|  | rpmuint8_t * | data
| ) |  |

Definition at line 441 of file crc.c.

References sum64Param::crc, and sum64Reset().

Referenced by rpmDigestInit().

int sum64Reset | ( | sum64Param * | mp | ) |

int sum64Update | ( | sum64Param * | mp,
|  | const rpmuint8_t * | data,
|  | size_t | size
| ) |  |

Definition at line 434 of file crc.c.

References sum64Param::crc, and sum64Param::update.

Referenced by rpmDigestInit().