Fix backup and restore of encrypted backups
After removing the DataManager code to support twrpTar separate
binary we were failing to pass / set the password for the various
separate threads used for openaes.
Change-Id: Ifff634777fe122e0195d84f67932177ca8879c2f
diff --git a/twrpTar.cpp b/twrpTar.cpp
index b053c08..ad328dd 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -234,6 +234,7 @@
enc[i].ItemList = &EncryptList;
enc[i].thread_id = i;
enc[i].use_encryption = use_encryption;
+ enc[i].setpassword(password);
enc[i].use_compression = use_compression;
enc[i].split_archives = 1;
LOGINFO("Start encryption thread %i\n", i);
@@ -379,6 +380,7 @@
if (TWFunc::Path_Exists(actual_filename)) {
thread_count++;
tars[i].basefn = basefn;
+ tars[i].setpassword(password);
tars[i].thread_id = i;
LOGINFO("Creating extract thread ID %i\n", i);
ret = pthread_create(&tar_thread[i], &tattr, extractMulti, (void*)&tars[i]);