diff options
author | Måns Rullgård <mans@mansr.com> | 2010-07-10 22:09:01 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-07-10 22:09:01 +0000 |
commit | e6b22522c94cfccda97018e52ab65da8c69d8a56 (patch) | |
tree | 4ecb09a4ae3f895d70ab882d841347d943eef0a2 /libavutil/sha.c | |
parent | 6b7917ba3ba16cbbcc81d9e007b26f82dd06400f (diff) | |
download | ffmpeg-e6b22522c94cfccda97018e52ab65da8c69d8a56.tar.gz |
bswap: change ME to NE in macro names
Other parts of FFmpeg use NE (native endian) rather than ME (machine).
This makes it consistent.
Originally committed as revision 24169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/sha.c')
-rw-r--r-- | libavutil/sha.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/sha.c b/libavutil/sha.c index 5a3b57535f..f89ea52a5f 100644 --- a/libavutil/sha.c +++ b/libavutil/sha.c @@ -43,7 +43,7 @@ const int av_sha_size = sizeof(AVSHA); #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ -#define blk0(i) (block[i] = be2me_32(((const uint32_t*)buffer)[i])) +#define blk0(i) (block[i] = be2ne_32(((const uint32_t*)buffer)[i])) #define blk(i) (block[i] = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1)) #define R0(v,w,x,y,z,i) z += ((w&(x^y))^y) + blk0(i) + 0x5A827999 + rol(v, 5); w = rol(w, 30); @@ -68,7 +68,7 @@ static void sha1_transform(uint32_t state[5], const uint8_t buffer[64]) for (i = 0; i < 80; i++) { int t; if (i < 16) - t = be2me_32(((uint32_t*)buffer)[i]); + t = be2ne_32(((uint32_t*)buffer)[i]); else t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1); block[i] = t; @@ -314,7 +314,7 @@ void av_sha_update(AVSHA* ctx, const uint8_t* data, unsigned int len) void av_sha_final(AVSHA* ctx, uint8_t *digest) { int i; - uint64_t finalcount = be2me_64(ctx->count << 3); + uint64_t finalcount = be2ne_64(ctx->count << 3); av_sha_update(ctx, "\200", 1); while ((ctx->count & 63) != 56) |