|
Librepo library
1.13.0
C library for downloading linux repository metadata and packages
|
Enumerations | |
| enum | LrChecksumType { LR_CHECKSUM_UNKNOWN, LR_CHECKSUM_MD5, LR_CHECKSUM_SHA1, LR_CHECKSUM_SHA224, LR_CHECKSUM_SHA256, LR_CHECKSUM_SHA384, LR_CHECKSUM_SHA512 } |
Functions | |
| LrChecksumType | lr_checksum_type (const char *type) |
| const char * | lr_checksum_type_to_str (LrChecksumType type) |
| char * | lr_checksum_fd (LrChecksumType type, int fd, GError **err) |
| gboolean | lr_checksum_fd_cmp (LrChecksumType type, int fd, const char *expected, gboolean caching, gboolean *matches, GError **err) |
| gboolean | lr_checksum_fd_compare (LrChecksumType type, int fd, const char *expected, gboolean caching, gboolean *matches, gchar **calculated, GError **err) |
| enum LrChecksumType |
Enum of supported checksum types. NOTE! This enum guarantee to be sorted by "hash quality"
Definition at line 36 of file checksum.h.
| char* lr_checksum_fd | ( | LrChecksumType | type, |
| int | fd, | ||
| GError ** | err | ||
| ) |
Calculate checksum for data pointed by file descriptor.
| type | Checksum type |
| fd | Opened file descriptor. Function seeks to the begin of the file. |
| err | GError ** |
| gboolean lr_checksum_fd_cmp | ( | LrChecksumType | type, |
| int | fd, | ||
| const char * | expected, | ||
| gboolean | caching, | ||
| gboolean * | matches, | ||
| GError ** | err | ||
| ) |
Calculate checksum for data pointed by file descriptor and compare it to the expected checksum value.
| type | Checksum type |
| fd | File descriptor |
| expected | String with expected checksum value |
| caching | Cache/Use cached checksum value as extended file attr. |
| matches | Set pointed variable to TRUE if checksum matches. |
| err | GError ** |
| gboolean lr_checksum_fd_compare | ( | LrChecksumType | type, |
| int | fd, | ||
| const char * | expected, | ||
| gboolean | caching, | ||
| gboolean * | matches, | ||
| gchar ** | calculated, | ||
| GError ** | err | ||
| ) |
Calculate checksum for data pointed by file descriptor and compare it to the expected checksum value.
| type | Checksum type |
| fd | File descriptor |
| expected | String with expected checksum value |
| caching | Cache/Use cached checksum value as extended file attr. |
| matches | Set pointed variable to TRUE if checksum matches. |
| calculated | If not NULL, the calculated checksum will be pointed here, the pointed string must be freed by caller. |
| err | GError ** |
| LrChecksumType lr_checksum_type | ( | const char * | type | ) |
Convert checksum name (string) to LrChecksumType.
| type | String with a checksum name (e.g. "sha1", "SHA256", ...) |
| const char* lr_checksum_type_to_str | ( | LrChecksumType | type | ) |
Convert LrChecksumType to string
| type | Checksum type |