* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "common.h"
+#include <string.h>
#include "avutil.h"
#include "bswap.h"
#include "sha.h"
+#include "sha1.h"
+#include "intreadwrite.h"
/** hash context */
typedef struct AVSHA {
{
unsigned int i, a, b, c, d, e, f, g, h;
uint32_t block[64];
- uint32_t T1, T2;
+ uint32_t T1, av_unused(T2);
a = state[0];
b = state[1];
av_sha_update(ctx, "", 1);
av_sha_update(ctx, (uint8_t *)&finalcount, 8); /* Should cause a transform() */
for (i = 0; i < ctx->digest_len; i++)
- ((uint32_t*)digest)[i] = be2me_32(ctx->state[i]);
+ AV_WB32(digest + i*4, ctx->state[i]);
}
#if LIBAVUTIL_VERSION_MAJOR < 51