From 83bd483f3db1df4b69c1612030e1a1be05b303ad Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Sat, 4 May 2013 12:39:56 +0000 Subject: Support encrypted backup files Also includes features merged from: Update twrpTar by kokotas Revised function entryExists(). Added function to get archive's uncompressed size. Added option to exclude item(s) from the archive. Revised forks() http://review.teamw.in/#/c/590/ Change-Id: I01fa2c81643161984eff2625247af75990684bd9 --- twrp-functions.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'twrp-functions.hpp') diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 8e31e4242..9f6662181 100644 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -50,6 +50,11 @@ public: static bool Fix_su_Perms(void); // sets proper permissions for su binaries and superuser apk static int tw_chmod(string fn, string mode); // chmod function that converts a 4 char string into st_mode automatically static bool Install_SuperSU(void); // Installs su binary and apk and sets proper permissions + static vector split_string(const string &in, char del, bool skip_empty); + static int Get_File_Type(string fn); // Determines file type, 0 for unknown, 1 for gzip, 2 for OAES encrypted + static int Try_Decrypting_File(string fn, string password); // -1 for some error, 0 for failed to decrypt, 1 for decrypted, 3 for decrypted and found gzip format + static bool Try_Decrypting_Backup(string Restore_Path, string Password); // true for success, false for failed to decrypt + static int Wait_For_Child(pid_t pid, int *status, string Child_Name); // Waits for pid to exit and checks exit status private: static void Copy_Log(string Source, string Destination); -- cgit v1.2.3