bigbiff bigbiff | 56cf564 | 2016-08-19 17:43:45 -0400 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2013 to 2017 TeamWin |
| 3 | This file is part of TWRP/TeamWin Recovery Project. |
| 4 | |
| 5 | TWRP is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation, either version 3 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | TWRP is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with TWRP. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef __TWRP_DIGEST_DRIVER |
| 20 | #define __TWRP_DIGEST_DRIVER |
| 21 | #include <string> |
| 22 | #include "twrpDigest/twrpDigest.hpp" |
| 23 | |
| 24 | class twrpDigestDriver { |
| 25 | public: |
| 26 | |
| 27 | static bool Check_Restore_File_Digest(const string& Filename); //Check the digest of a TWRP partition backup |
| 28 | static bool Check_Digest(string Full_Filename); //Check to make sure the digest is correct |
| 29 | static bool Write_Digest(string Full_Filename); //Write the digest to a file |
| 30 | static bool Make_Digest(string Full_Filename); //Create the digest for a partition backup |
| 31 | static bool stream_file_to_digest(string filename, twrpDigest* digest); //Stream the file to twrpDigest |
| 32 | }; |
| 33 | #endif //__TWRP_DIGEST_DRIVER |