]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Move archive_entry_set_digest() to public API (#2540)
authorNicholas Vinson <nvinson@users.noreply.github.com>
Sun, 16 Mar 2025 23:37:47 +0000 (19:37 -0400)
committerGitHub <noreply@github.com>
Sun, 16 Mar 2025 23:37:47 +0000 (16:37 -0700)
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.

libarchive/archive_entry.h
libarchive/archive_entry_private.h

index fb6c26fac8d29fa6540376dc4d5b6cc2c19f4246..5643905977a073ddad3cdebeeba6fbf5d9ed6ce1 100644 (file)
@@ -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
index 15f2a8ee284c652c8833bc028d57b4407898fdf0..0c1c9fa4bb7c6abb9cb6fb1f8ca005b1799df956 100644 (file)
@@ -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 */