From c54eafce8e831167f802c3fbd92034dd895ba8b8 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 2 Mar 2024 10:01:14 +0100 Subject: [PATCH] prefix hash with hashing algorithm used This is what the narinfo format also does, and generally common for hashes in nix. --- utils/src/bin/build-hook.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/src/bin/build-hook.rs b/utils/src/bin/build-hook.rs index b8606c8..29e479e 100644 --- a/utils/src/bin/build-hook.rs +++ b/utils/src/bin/build-hook.rs @@ -25,7 +25,7 @@ async fn main() -> Result<()> { .split(" ") .map(|path| OutputAttestation { output_path: path, - output_hash: hash_path("sha256", Base32, path).unwrap(), + output_hash: format!("sha256:{0}", hash_path("sha256", Base32, path).unwrap()), }) .collect();