|
Subversion
|
Go to the documentation of this file.
27 #ifndef SVN_CHECKSUM_H
28 #define SVN_CHECKSUM_H
31 #include <apr_pools.h>
155 apr_pool_t *result_pool,
156 apr_pool_t *scratch_pool);
168 apr_pool_t *result_pool,
169 apr_pool_t *scratch_pool);
292 apr_pool_t *scratch_pool,
295 __attribute__ ((format(printf, 4, 5)));
svn_checksum_kind_t kind
The type of the checksum.
svn_checksum_kind_t
Various types of checksums.
svn_error_t * svn_checksum_ctx_reset(svn_checksum_ctx_t *ctx)
Reset an existing checksum ctx to initial state.
svn_error_t * svn_checksum_parse_hex(svn_checksum_t **checksum, svn_checksum_kind_t kind, const char *hex, apr_pool_t *pool)
Parse the hex representation hex of a checksum of kind kind and set *checksum to the result,...
svn_error_t * svn_checksum_clear(svn_checksum_t *checksum)
Set checksum->digest to all zeros, which, by convention, matches all other checksums.
apr_size_t svn_checksum_size(const svn_checksum_t *checksum)
Return the digest size of checksum.
svn_error_t * svn_checksum_final(svn_checksum_t **checksum, const svn_checksum_ctx_t *ctx, apr_pool_t *pool)
Finalize the checksum used when creating ctx, and put the resultant checksum in *checksum,...
A generic checksum representation.
@ svn_checksum_sha1
The checksum is (or should be set to) a SHA1 checksum.
const char * svn_checksum_serialize(const svn_checksum_t *checksum, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Return a serialized representation of checksum, allocated in result_pool.
svn_checksum_t * svn_checksum_create(svn_checksum_kind_t kind, apr_pool_t *pool)
Return a new checksum structure of type kind, initialized to the all- zeros value,...
svn_boolean_t svn_checksum_match(const svn_checksum_t *checksum1, const svn_checksum_t *checksum2)
Compare checksums checksum1 and checksum2.
svn_checksum_t * svn_checksum_empty_checksum(svn_checksum_kind_t kind, apr_pool_t *pool)
Return in pool a newly allocated checksum populated with the checksum of type kind for the empty stri...
svn_error_t * svn_checksum_deserialize(const svn_checksum_t **checksum, const char *data, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Return checksum from the serialized format at data.
@ svn_checksum_fnv1a_32x4
The checksum is (or should be set to) a modified FNV-1a 32 bit, in big endian byte order.
svn_error_t * svn_checksum_mismatch_err(const svn_checksum_t *expected, const svn_checksum_t *actual, apr_pool_t *scratch_pool, const char *fmt,...)
Return an error of type SVN_ERR_CHECKSUM_MISMATCH for actual and expected checksums which do not matc...
@ svn_checksum_md5
The checksum is (or should be set to) an MD5 checksum.
@ svn_checksum_fnv1a_32
The checksum is (or should be set to) a FNV-1a 32 bit checksum, in big endian byte order.
svn_checksum_t * svn_checksum_dup(const svn_checksum_t *checksum, apr_pool_t *pool)
Return a deep copy of checksum, allocated in pool.
struct svn_checksum_ctx_t svn_checksum_ctx_t
Opaque type for creating checksums of data.
const char * svn_checksum_to_cstring(const svn_checksum_t *checksum, apr_pool_t *pool)
Return the hex representation of checksum, allocating the string in pool.
int svn_boolean_t
YABT: Yet Another Boolean Type.
svn_error_t * svn_checksum_update(svn_checksum_ctx_t *ctx, const void *data, apr_size_t len)
Update the checksum represented by ctx, with len bytes starting at data.
struct svn_checksum_t svn_checksum_t
A generic checksum representation.
svn_boolean_t svn_checksum_is_empty_checksum(svn_checksum_t *checksum)
Return TRUE iff checksum matches the checksum for the empty string.
svn_error_t * svn_checksum(svn_checksum_t **checksum, svn_checksum_kind_t kind, const void *data, apr_size_t len, apr_pool_t *pool)
Return in *checksum the checksum of type kind for the bytes beginning at data, and going for len.
svn_checksum_ctx_t * svn_checksum_ctx_create(svn_checksum_kind_t kind, apr_pool_t *pool)
Create a new svn_checksum_ctx_t structure, allocated from pool for calculating checksums of type kind...
const char * svn_checksum_to_cstring_display(const svn_checksum_t *checksum, apr_pool_t *pool)
Return the hex representation of checksum, allocating the string in pool.
const unsigned char * digest
The bytes of the checksum.