History

lavu/sha512: update length argument following sha+md5 changes

Clément Bœsch committed 9 years ago

Commit fcc4ed11 parent 651ee933 files · +10 −1Browse files

Unified · Split

3 files
  1. doc/APIchanges +1 −1
  2. libavutil/sha512.c +4 −0
  3. libavutil/sha512.h +5 −0
doc/APIchanges+1−1
@@ -16,7 +16,7 @@ libavutil: 2015-08-28 · 15 unmodified lines
1616 API changes, most recent first:
1717
1818 2017-xx-xx - xxxxxxxxxx
19− Change av_sha_update() and av_md5_sum()/av_md5_update() length
19+ Change av_sha_update(), av_sha512_update() and av_md5_sum()/av_md5_update() length
2020 parameter type to size_t at next major bump.
2121
2222 2017-05-05 - xxxxxxxxxx - lavc 57.94.100 - avcodec.h
libavutil/sha512.c+4−0
@@ -239,7 +239,11 @@ av_cold int av_sha512_init(AVSHA512 *ctx, int bits) · 238 unmodified lines
239239 return 0;
240240 }
241241
242+#if FF_API_CRYPTO_SIZE_T
242243 void av_sha512_update(AVSHA512* ctx, const uint8_t* data, unsigned int len)
244+#else
245+void av_sha512_update(AVSHA512* ctx, const uint8_t* data, size_t len)
246+#endif
243247 {
244248 unsigned int i, j;
245249
libavutil/sha512.h+5−0
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #ifndef AVUTIL_SHA512_H
2929 #define AVUTIL_SHA512_H
3030
31+#include <stddef.h>
3132 #include <stdint.h>
3233
3334 #include "attributes.h"
@@ -75,7 +76,11 @@ int av_sha512_init(struct AVSHA512* context, int bits); · 41 unmodified lines
7576 * @param data input data to update hash with
7677 * @param len input data length
7778 */
79+#if FF_API_CRYPTO_SIZE_T
7880 void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len);
81+#else
82+void av_sha512_update(struct AVSHA512* context, const uint8_t* data, size_t len);
83+#endif
7984
8085 /**
8186 * Finish hashing and output digest value.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t