This is simpler, safer, and removes the undocumented requirement of
aligned output buffer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
#include <stdint.h>
#include "bswap.h"
+#include "intreadwrite.h"
#include "md5.h"
typedef struct AVMD5{
av_md5_update(ctx, (uint8_t*)&finalcount, 8);
for(i=0; i<4; i++)
- ((uint32_t*)dst)[i]= av_le2ne32(ctx->ABCD[3-i]);
+ AV_WL32(dst + 4*i, ctx->ABCD[3-i]);
}
void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){