From 4f709d224ae02c7875fbba31094f3cbc44f56807 Mon Sep 17 00:00:00 2001 From: LeRoyce Pearson Date: Fri, 6 Mar 2020 22:27:20 -0700 Subject: [PATCH] Make hash digest same size as in the c API --- lib/std/cache_hash.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig index 4b4ae8f74c..d0b1b81bd8 100644 --- a/lib/std/cache_hash.zig +++ b/lib/std/cache_hash.zig @@ -12,7 +12,7 @@ const os = @import("os.zig"); const base64_encoder = fs.base64_encoder; const base64_decoder = fs.base64_decoder; -const BIN_DIGEST_LEN = 32; +const BIN_DIGEST_LEN = 48; const BASE64_DIGEST_LEN = base64.Base64Encoder.calcSize(BIN_DIGEST_LEN); pub const File = struct { @@ -203,7 +203,7 @@ pub const CacheHash = struct { // TODO: check for problematic timestamp - var actual_digest: [32]u8 = undefined; + var actual_digest: [BIN_DIGEST_LEN]u8 = undefined; try hash_file(self.alloc, &actual_digest, &this_file); if (!mem.eql(u8, &cache_hash_file.bin_digest, &actual_digest)) {