From e435beb1ea5380a90774dbf51fdc8c941e486551 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 15 Dec 2016 12:46:03 +0100 Subject: crypto: consistently use size_t as type for length parameters size_t is the correct type to use for sizes. --- libavutil/sha.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavutil/sha.h') diff --git a/libavutil/sha.h b/libavutil/sha.h index 86ea0b065e..c0c7cd1af1 100644 --- a/libavutil/sha.h +++ b/libavutil/sha.h @@ -21,6 +21,7 @@ #ifndef AVUTIL_SHA_H #define AVUTIL_SHA_H +#include #include #include "attributes.h" @@ -51,11 +52,15 @@ int av_sha_init(struct AVSHA* context, int bits); /** * Update hash value. * - * @param context hash function context + * @param ctx hash function context * @param data input data to update hash with * @param len input data length */ -void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len); +#if FF_API_CRYPTO_SIZE_T +void av_sha_update(struct AVSHA *ctx, const uint8_t *data, unsigned int len); +#else +void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len); +#endif /** * Finish hashing and output digest value. -- cgit v1.2.3