Commit 8a8d0b31 authored by James Almer's avatar James Almer

avutil/crypto: change length parameter to size_t on the remaining modules

See 651ee934
fcc4ed1eSigned-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 75027066
......@@ -15,6 +15,10 @@ libavutil: 2017-10-21
API changes, most recent first:
2018-02-xx - xxxxxxx
Change av_ripemd_update(), av_murmur3_update() and av_hash_update() length
parameter type to size_t at next major bump.
2018-02-xx - xxxxxxx - lavfi 7.12.100 - avfilter.h
Add AVFilterContext.extra_hw_frames.
......
......@@ -155,7 +155,11 @@ void av_hash_init(AVHashContext *ctx)
}
}
#if FF_API_CRYPTO_SIZE_T
void av_hash_update(AVHashContext *ctx, const uint8_t *src, int len)
#else
void av_hash_update(AVHashContext *ctx, const uint8_t *src, size_t len)
#endif
{
switch (ctx->type) {
case MD5: av_md5_update(ctx->ctx, src, len); break;
......
......@@ -29,6 +29,8 @@
#include <stdint.h>
#include "version.h"
/**
* @defgroup lavu_hash Hash Functions
* @ingroup lavu_crypto
......@@ -179,7 +181,11 @@ void av_hash_init(struct AVHashContext *ctx);
* @param[in] src Data to be added to the hash context
* @param[in] len Size of the additional data
*/
#if FF_API_CRYPTO_SIZE_T
void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len);
#else
void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, size_t len);
#endif
/**
* Finalize a hash context and compute the actual hash value.
......
......@@ -89,7 +89,11 @@ static inline uint64_t update_h2(uint64_t k, uint64_t h1, uint64_t h2)
return k;
}
#if FF_API_CRYPTO_SIZE_T
void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, int len)
#else
void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, size_t len)
#endif
{
const uint8_t *end;
uint64_t h1 = c->h1, h2 = c->h2;
......
......@@ -29,6 +29,8 @@
#include <stdint.h>
#include "version.h"
/**
* @defgroup lavu_murmur3 Murmur3
* @ingroup lavu_hash
......@@ -97,7 +99,11 @@ void av_murmur3_init(struct AVMurMur3 *c);
* @param[in] src Input data to update hash with
* @param[in] len Number of bytes to read from `src`
*/
#if FF_API_CRYPTO_SIZE_T
void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len);
#else
void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, size_t len);
#endif
/**
* Finish hashing and output digest value.
......
......@@ -510,7 +510,11 @@ av_cold int av_ripemd_init(AVRIPEMD *ctx, int bits)
return 0;
}
#if FF_API_CRYPTO_SIZE_T
void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, unsigned int len)
#else
void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, size_t len)
#endif
{
unsigned int i, j;
......
......@@ -66,7 +66,11 @@ int av_ripemd_init(struct AVRIPEMD* context, int bits);
* @param data input data to update hash with
* @param len input data length
*/
#if FF_API_CRYPTO_SIZE_T
void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len);
#else
void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, size_t len);
#endif
/**
* Finish hashing and output digest value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment