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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/mesa/src/util/mesa-sha1.h b/lib/mesa/src/util/mesa-sha1.h
index 9842bbb1e..9d174fd9b 100644
--- a/lib/mesa/src/util/mesa-sha1.h
+++ b/lib/mesa/src/util/mesa-sha1.h
@@ -24,6 +24,8 @@
#define MESA_SHA1_H
#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
#include "c99_compat.h"
#include "sha1/sha1.h"
@@ -32,6 +34,7 @@ extern "C" {
#endif
#define mesa_sha1 _SHA1_CTX
+#define SHA1_DIGEST_LENGTH32 (SHA1_DIGEST_LENGTH / 4)
static inline void
_mesa_sha1_init(struct mesa_sha1 *ctx)
@@ -60,6 +63,13 @@ _mesa_sha1_hex_to_sha1(unsigned char *buf, const char *hex);
void
_mesa_sha1_compute(const void *data, size_t size, unsigned char result[20]);
+void
+_mesa_sha1_print(FILE *f, const uint8_t sha1[SHA1_DIGEST_LENGTH]);
+
+bool
+_mesa_printed_sha1_equal(const uint8_t sha1[SHA1_DIGEST_LENGTH],
+ const uint32_t printed_sha1[SHA1_DIGEST_LENGTH32]);
+
#ifdef __cplusplus
} /* extern C */
#endif