summaryrefslogtreecommitdiff
path: root/lib/mesa/src/util/mesa-sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/util/mesa-sha1.h')
-rw-r--r--lib/mesa/src/util/mesa-sha1.h35
1 files changed, 12 insertions, 23 deletions
diff --git a/lib/mesa/src/util/mesa-sha1.h b/lib/mesa/src/util/mesa-sha1.h
index bde50ba1e..1599405cd 100644
--- a/lib/mesa/src/util/mesa-sha1.h
+++ b/lib/mesa/src/util/mesa-sha1.h
@@ -20,38 +20,27 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef MESA_SHA1_H
-#define MESA_SHA1_H
-
-#include <stdlib.h>
-#include "c99_compat.h"
-#include "sha1/sha1.h"
+#ifndef SHA1_H
+#define SHA1_H
#ifdef __cplusplus
extern "C" {
#endif
-#define mesa_sha1 _SHA1_CTX
+#include <stdlib.h>
-static inline void
-_mesa_sha1_init(struct mesa_sha1 *ctx)
-{
- SHA1Init(ctx);
-}
+struct mesa_sha1;
-static inline void
-_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, size_t size)
-{
- SHA1Update(ctx, (const unsigned char *)data, size);
-}
+struct mesa_sha1 *
+_mesa_sha1_init(void);
-static inline void
-_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20])
-{
- SHA1Final(result, ctx);
-}
+int
+_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size);
-void
+int
+_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20]);
+
+char *
_mesa_sha1_format(char *buf, const unsigned char *sha1);
void