From: Nicholas Vinson Date: Sun, 16 Mar 2025 23:37:47 +0000 (-0400) Subject: Move archive_entry_set_digest() to public API (#2540) X-Git-Tag: v3.8.0~63 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a323e5fa6811e77e1bf6b7fad7deaa8c2281d900;p=thirdparty%2Flibarchive.git Move archive_entry_set_digest() to public API (#2540) Moving archive_entry_set_digest() to the public API simplifies porting non-archive formats to archive formats while preserving supported message digests specifically in cases where recomputing digests is not viable. --- diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h index fb6c26fac..564390597 100644 --- a/libarchive/archive_entry.h +++ b/libarchive/archive_entry.h @@ -438,6 +438,7 @@ __LA_DECL void archive_entry_copy_mac_metadata(struct archive_entry *, const voi #define ARCHIVE_ENTRY_DIGEST_SHA512 0x00000006 __LA_DECL const unsigned char * archive_entry_digest(struct archive_entry *, int /* type */); +__LA_DECL int archive_entry_set_digest(struct archive_entry *, int, const unsigned char *); /* * ACL routines. This used to simply store and return text-format ACL diff --git a/libarchive/archive_entry_private.h b/libarchive/archive_entry_private.h index 15f2a8ee2..0c1c9fa4b 100644 --- a/libarchive/archive_entry_private.h +++ b/libarchive/archive_entry_private.h @@ -195,8 +195,4 @@ struct archive_entry { int ae_symlink_type; }; -int -archive_entry_set_digest(struct archive_entry *entry, int type, - const unsigned char *digest); - #endif /* ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */