From 56cf56465857e79e814b1e2d50f13e176170fcb3 Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Fri, 19 Aug 2016 17:43:45 -0400 Subject: twrpDigest refactor This patch is to refactor twrpDigest using polymorphism and inheritance to use the same call patterns for creating and reading a digest. Now a library. Use SHA2 from libcrypto. SHA2 is default if device has libcrypto. Change string MD5 everywhere to use digest or Digest instead. Updated string tags to digest. Translation will be required. Switch out digest code into a driver class from partitionmanager. SHA2 is better for digest creation due to decreased collision space compared to MD5 and SHA1. See https://en.wikipedia.org/wiki/SHA-2 Change-Id: I74b5546789990b12aa4ce2e389d25f80a3fe213f --- gui/theme/common/languages/en.xml | 40 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'gui/theme/common/languages/en.xml') diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index c14c3466e..5c208316c 100644 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -215,7 +215,8 @@ disabled - set a password to enable enabled Enable compression - Skip MD5 generation during backup + Disable free space check before backup + Skip Digest generation during backup Disable free space check before backup Current Slot: %tw_active_slot% Slot A @@ -253,7 +254,7 @@ Trying Decryption Backup made on %tw_restore_file_date% Select Partitions to Restore: - Enable MD5 Verification of Backup Files + Enable Digest Verification of Backup Files Restore Complete Swipe to Restore Restore @@ -495,12 +496,12 @@ MTP Crashed, not starting MTP on boot. Successfully decrypted with default password. Unable to decrypt with default password. You may need to perform a Format Data. - Generating MD5 - - * Generating md5... - * MD5 Created. - * MD5 Error! - * Error computing MD5. + Generating Digest + + * Generating digest... + * Digest Created. + * Digest Error! + * Error computing Digest. (Current Date) (Auto Generate) Unable to locate '{1}' partition for backup calculations. @@ -521,8 +522,8 @@ Restore folder: '{1}' [{1} done ({2} seconds)] - Verifying MD5 - Skipping MD5 check based on user setting. + Verifying Digest + Skipping Digest check based on user setting. Calculating restore details... Cannot restore {1} -- mounted read only. Unable to locate '{1}' partition for restoring. @@ -585,9 +586,9 @@ Cannot resize {1}. Repairing {1} before resizing. Unable to resize {1}. - No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore. - MD5 failed to match on '{1}'. - MD5 matched for '{1}'. + No digest file found for '{1}'. Please unselect Enable Digest verification to restore. + Digest failed to match on '{1}'. + Digest matched for '{1}'. Failed to decrypt tar file '{1}' You may need to reboot recovery to be able to use /data again. Unable to format to remove encryption. @@ -609,7 +610,7 @@ Backup folder set to '{1}' Unable to locate backup '{1}' Setting restore options: '{1}': - MD5 check skip is on + Digest check skip is on Unable to use OpenRecoveryScript to restore an encrypted backup. Mounting Unmounting @@ -630,23 +631,23 @@ Installing zip file '{1}' Setting backup options: Compression is on - MD5 Generation is off + Digest Generation is off Backup Failed Backup Failed. Cleaning Backup Folder. Running Recovery Commands Recovery Commands Complete Running OpenRecoveryScript OpenRecoveryScript Complete + Checking for Digest file... Invalid zip file format! - Checking for MD5 file... Failed to map file '{1}' Verifying zip signature... Zip signature verification failed! Zip signature verified successfully. Zip file is corrupt! - Skipping MD5 check: no MD5 file found - MD5 does not match - MD5 matched + Skipping Digest check: no Digest file found + Digest does not match + Digest matched {1} process ended with signal: {2} {1} process ended with ERROR: {2} Installing HTC Dumlock to system... @@ -691,6 +692,7 @@ path: {1} not found in partititon list Copied kernel log to {1} Include Kernel Log + Use SHA2 for hashing Error changing bootloader boot slot to {1} -- cgit v1.2.3