createrepo_c library
0.9.1
C library for metadata manipulation
|
Typedefs | |
typedef struct _cr_ChecksumCtx | cr_ChecksumCtx |
Functions | |
const char * | cr_checksum_name_str (cr_ChecksumType type) |
cr_ChecksumType | cr_checksum_type (const char *name) |
char * | cr_checksum_file (const char *filename, cr_ChecksumType type, GError **err) |
cr_ChecksumCtx * | cr_checksum_new (cr_ChecksumType type, GError **err) |
int | cr_checksum_update (cr_ChecksumCtx *ctx, const void *buf, size_t len, GError **err) |
char * | cr_checksum_final (cr_ChecksumCtx *ctx, GError **err) |
typedef struct _cr_ChecksumCtx cr_ChecksumCtx |
Checksum context.
Definition at line 36 of file checksum.h.
enum cr_ChecksumType |
Enum of supported checksum types. Note: SHA is just a "nickname" for the SHA1. This is for the compatibility with original createrepo.
Definition at line 43 of file checksum.h.
char* cr_checksum_file | ( | const char * | filename, |
cr_ChecksumType | type, | ||
GError ** | err | ||
) |
Compute file checksum.
filename | filename |
type | type of checksum |
err | GError ** |
char* cr_checksum_final | ( | cr_ChecksumCtx * | ctx, |
GError ** | err | ||
) |
Finalize checksum calculation, return checksum string and frees all checksum context resources.
ctx | Checksum context. |
err | GError ** |
const char* cr_checksum_name_str | ( | cr_ChecksumType | type | ) |
Return checksum name.
type | checksum type |
cr_ChecksumCtx* cr_checksum_new | ( | cr_ChecksumType | type, |
GError ** | err | ||
) |
Create new checksum context.
type | Checksum algorithm of the new checksum context. |
err | GError ** |
cr_ChecksumType cr_checksum_type | ( | const char * | name | ) |
Return checksum type.
name | checksum name |
int cr_checksum_update | ( | cr_ChecksumCtx * | ctx, |
const void * | buf, | ||
size_t | len, | ||
GError ** | err | ||
) |
Feeds data into the checksum.
ctx | Checksum context. |
buf | Pointer to the data. |
len | Length of the data. |
err | GError ** |