#include "sha1/sha1.h"
#include "mesa-sha1.h"
-int
-_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size)
-{
- SHA1Update(ctx, data, size);
- return 1;
-}
-
void
_mesa_sha1_compute(const void *data, size_t size, unsigned char result[20])
{
_mesa_sha1_final(&ctx, result);
}
-char *
+void
_mesa_sha1_format(char *buf, const unsigned char *sha1)
{
static const char hex_digits[] = "0123456789abcdef";
buf[i + 1] = hex_digits[sha1[i >> 1] & 0x0f];
}
buf[i] = '\0';
-
- return buf;
}