commit 70b8fa9287a63564c07fb972714585fb10b78761 from: Omar Polo via: Thomas Adam date: Sat Feb 25 00:43:33 2023 UTC add some helper functions to compute hashes This adds a set of functions to abstract over SHA1Init, SHA1Update, SHA1Final, their respective SHA256 variants and how to compare digests. Replace all the SHA1*() usage with the new APIs. It's a preparatory step for sha256 handling. ok stsp@ commit - b1ec8cee26c37a4d2687babea76a8ba4e7d724ad commit + 70b8fa9287a63564c07fb972714585fb10b78761 blob - ae96825b2544aed0b77b6b83a68e89e97d24c0f1 blob + 9133b40383747d7fbabbf59b4dee0ff47cba156b --- lib/pack_create.c +++ lib/pack_create.c @@ -1600,8 +1600,8 @@ write_packed_object(off_t *packfile_size, int packfd, struct got_raw_object *raw = NULL; off_t outlen, delta_offset; - memset(&csum, 0, sizeof(csum)); csum.output_ctx = ctx; + csum.output_crc = NULL; if (m->reused_delta_offset) delta_offset = m->reused_delta_offset;