summaryrefslogtreecommitdiff
path: root/libarchive/archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive.h')
-rw-r--r--libarchive/archive.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libarchive/archive.h b/libarchive/archive.h
index 2fb78b8b..aa1f8a14 100644
--- a/libarchive/archive.h
+++ b/libarchive/archive.h
@@ -218,6 +218,13 @@ typedef int archive_switch_callback(struct archive *, void *_client_data1,
void *_client_data2);
/*
+ * Returns a passphrase used for encryption or decryption, NULL on nothing
+ * to do and give it up.
+ */
+typedef const char *archive_passphrase_callback(struct archive *,
+ void *_client_data);
+
+/*
* Codes to identify various stream filters.
*/
#define ARCHIVE_FILTER_NONE 0
@@ -582,6 +589,14 @@ __LA_DECL int archive_read_set_option(struct archive *_a,
__LA_DECL int archive_read_set_options(struct archive *_a,
const char *opts);
+/*
+ * Add a decryption passphrase.
+ */
+__LA_DECL int archive_read_add_passphrase(struct archive *, const char *);
+__LA_DECL int archive_read_set_passphrase_callback(struct archive *,
+ void *client_data, archive_passphrase_callback *);
+
+
/*-
* Convenience function to recreate the current entry (whose header
* has just been read) on disk.
@@ -815,6 +830,11 @@ __LA_DECL int archive_write_set_option(struct archive *_a,
__LA_DECL int archive_write_set_options(struct archive *_a,
const char *opts);
+/*
+ * Set a encryption passphrase.
+ */
+__LA_DECL int archive_write_set_passphrase(struct archive *_a, const char *p);
+
/*-
* ARCHIVE_WRITE_DISK API
*