summaryrefslogtreecommitdiff
path: root/head
diff options
context:
space:
mode:
authorChloe M. <chloe@aptel.org>2026-08-22 06:48:01 +0000
committerChloe M. <chloe@aptel.org>2026-08-22 09:45:33 +0000
commit7683205c69c76b6515c242429a927974aedfb5c0 (patch)
tree0d6661f646f7789681b99afab5f3eb2eb7ecb7e4 /head
parentf0691430d86a727b4ffee0f6ea3b355baecd6414 (diff)
core: build: Add manifest handling
This resolves redundant rebuilds by detecting when there are differences in a built file. Signed-off-by: Chloe M. <chloe@aptel.org>
Diffstat (limited to 'head')
-rw-r--r--head/bop/hash.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/head/bop/hash.h b/head/bop/hash.h
new file mode 100644
index 0000000..011812f
--- /dev/null
+++ b/head/bop/hash.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2026, Chloe M., et al.
+ * Provided under the BSD-3 clause.
+ */
+
+#ifndef BOP_HASH_H
+#define BOP_HASH_H 1
+
+#include <stdint.h>
+#include <stddef.h>
+#include <openssl/sha.h>
+
+#define BOP_HASH_LEN 65
+
+/*
+ * Hash a file with SHA256
+ *
+ * @path: Path of file to hash
+ * @hashres: Hash result is written here
+ *
+ * Returns zero on success
+ */
+int bop_hash_file(const char *path, char hashres[BOP_HASH_LEN]);
+
+#endif /* !BOP_HASH_H */