[FFmpeg-cvslog] avutil/aes: Rename crypt()
Michael Niedermayer
git at videolan.org
Wed Jan 28 13:53:48 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 28 13:12:02 2015 +0100| [0d37ca150c5ef0a5dd32946f99ded6862579b093] | committer: Michael Niedermayer
avutil/aes: Rename crypt()
This avoids a potential conflict with the equally named function from XOPEN
It also could reduce confusion in debugger backtraces
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d37ca150c5ef0a5dd32946f99ded6862579b093
---
libavutil/aes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/aes.c b/libavutil/aes.c
index 638fb81..9eb2bb3 100644
--- a/libavutil/aes.c
+++ b/libavutil/aes.c
@@ -127,7 +127,7 @@ static inline void mix(av_aes_block state[2], uint32_t multbl[][256], int s1, in
state[0].u32[3] = mix_core(multbl, src[3][0], src[s1-1][1], src[1][2], src[s3-1][3]);
}
-static inline void crypt(AVAES *a, int s, const uint8_t *sbox,
+static inline void aes_crypt(AVAES *a, int s, const uint8_t *sbox,
uint32_t multbl[][256])
{
int r;
@@ -146,7 +146,7 @@ void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src,
while (count--) {
addkey_s(&a->state[1], src, &a->round_key[a->rounds]);
if (decrypt) {
- crypt(a, 0, inv_sbox, dec_multbl);
+ aes_crypt(a, 0, inv_sbox, dec_multbl);
if (iv) {
addkey_s(&a->state[0], iv, &a->state[0]);
memcpy(iv, src, 16);
@@ -155,7 +155,7 @@ void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src,
} else {
if (iv)
addkey_s(&a->state[1], iv, &a->state[1]);
- crypt(a, 2, sbox, enc_multbl);
+ aes_crypt(a, 2, sbox, enc_multbl);
addkey_d(dst, &a->state[0], &a->round_key[0]);
if (iv)
memcpy(iv, dst, 16);
More information about the ffmpeg-cvslog
mailing list