FinalCrypt - The No¹ One-Time Pad Encryption
Révision | 6ec6ab0e9d4f5a8cac1e9a500ca2c90636c1f1e4 (tree) |
---|---|
l'heure | 2019-09-28 11:15:46 |
Auteur | ron <ronuitzaandam@gmai...> |
Commiter | ron |
5.6.1 Improved Brute Force CLUI Validation and Statistics
@@ -1,3 +1,5 @@ | ||
1 | +5.6.1 Improved Brute Force CLUI Validation and Statistics | |
2 | + | |
1 | 3 | 5.6.0 Added Brute Force Password Dictionary Scan function |
2 | 4 | This allows users to try to recover a lost password |
3 | 5 | Performance tested approx 1000 passwords per second |
@@ -14,16 +14,18 @@ Examples: | ||
14 | 14 | java -cp finalcrypt.jar rdj/CLUI --decrypt -k "key_file" -t "target_file" # Decrypt (Manual Key Mode not recommended) |
15 | 15 | |
16 | 16 | Mode: |
17 | - <--scan> -k "key_dir" -t "target" Print scan results and quit. | |
18 | - <--encrypt> -k "key_dir" -t "target" Encrypt Targets. | |
19 | - <--decrypt> -k "key_dir" -t "target" Decrypt Targets. | |
20 | - <--create-keydev> -k "key_file" -t "target" Create Key Device (only unix). | |
17 | + | |
18 | + <--scan> -k "key_dir" -t "target" Print scan results and quit. | |
19 | + <--encrypt> -k "key_dir" -t "target" Encrypt Targets. | |
20 | + <--decrypt> -k "key_dir" -t "target" Decrypt Targets. | |
21 | + <--create-keydev> -k "key_file" -t "target" Create Key Device (only unix). | |
21 | 22 | <--create-keyfile> -K "key_file" -S "Size (bytes)" Create OTP Key File. |
22 | 23 | <--clone-keydev> -k "source_device" -t "target_device" Clone Key Device (only unix). |
23 | - [--print-gpt] -t "target_device" Print GUID Partition Table. | |
24 | - [--delete-gpt] -t "target_device" Delete GUID Partition Table (DATA LOSS!). | |
24 | + [--print-gpt] -t "target_device" Print GUID Partition Table. | |
25 | + [--delete-gpt] -t "target_device" Delete GUID Partition Table (DATA LOSS!). | |
25 | 26 | |
26 | 27 | Options: |
28 | + | |
27 | 29 | [-h] [--help] Print help page. |
28 | 30 | [--password] -p 'password' Optional password (non-interactive). |
29 | 31 | [--password-prompt] -pp Optional password (safe interactive prompt). |
@@ -60,4 +62,4 @@ Parameters: | ||
60 | 62 | <[-t "file/dir"]> Target items (files or directories) you want to encrypt (recursive). |
61 | 63 | <[-b "batchfile"]> Batchfile with targetfiles you want to encrypt (only files). |
62 | 64 | |
63 | -FinalCrypt 5.6.0 - Author: Ron de Jong <info@finalcrypt.org> - Copyright: © 2017-2019 | |
\ No newline at end of file | ||
65 | +FinalCrypt 5.6.1 - Author: Ron de Jong <info@finalcrypt.org> - Copyright: © 2017-2019 | |
\ No newline at end of file |
@@ -76,4 +76,4 @@ Key Device Examples (Linux): | ||
76 | 76 | java -cp finalcrypt.jar rdj/CLUI --encrypt -k /dev/sdc1 -t myfile |
77 | 77 | java -cp finalcrypt.jar rdj/CLUI --decrypt -k /dev/sdc1 -t myfile |
78 | 78 | |
79 | -FinalCrypt 5.6.0 - Author: Ron de Jong <info@finalcrypt.org> - Copyright: © 2017-2019 | |
\ No newline at end of file | ||
79 | +FinalCrypt 5.6.1 - Author: Ron de Jong <info@finalcrypt.org> - Copyright: © 2017-2019 | |
\ No newline at end of file |
@@ -8,7 +8,7 @@ application.homepage=http://www.finalcrypt.org/ | ||
8 | 8 | application.splash= |
9 | 9 | application.title=FinalCrypt |
10 | 10 | application.vendor=FinalCrypt |
11 | -application.implementation.version=5.6.0 | |
11 | +application.implementation.version=5.6.1 | |
12 | 12 | auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=false |
13 | 13 | auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4 |
14 | 14 | auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4 |
@@ -443,79 +443,89 @@ public class CLUI implements UI | ||
443 | 443 | |
444 | 444 | if ( dictionary ) |
445 | 445 | { |
446 | - // buildTargetSelection(UI ui, ArrayList<Path> userSelectedItemsPathList, Path keyPath, ArrayList<FCPath> targetFCPathList, boolean symlink, String pattern, boolean negatePattern, boolean disabledMAC, boolean status) | |
447 | - Validate.buildSelection(this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, false); | |
448 | - Path dictFilePath; | |
449 | -// isValidFile(UI ui, String caller, Path targetSourcePath, isKey boolean device, long minSize, boolean symlink, boolean writable, boolean report) | |
450 | - if ( Validate.isValidFile(this, "CLUI Dictionary File", Paths.get(dictionaryFilePathString), false, false, 1L, symlink, true, true) ) | |
446 | +// Validate.buildTargetSelection(UI ui, ArrayList<Path> userSelectedItemsPathList, Path keyPath, ArrayList<FCPath> targetFCPathList, boolean symlink, String pattern, boolean negatePattern, boolean disabledMAC, boolean status) | |
447 | + Validate.buildSelection( this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, true); | |
448 | + if ( targetFCPathList.validFiles > 0 ) | |
451 | 449 | { |
452 | - dictFilePath = Paths.get(dictionaryFilePathString); | |
453 | - int lines = 0; | |
454 | - try { lines = Files.readAllLines(dictFilePath).size(); } catch (IOException ex) { log("Files.readAllLines(" + dictFilePath + ").size();" + ex.getMessage(), false, true, true, true, false); } | |
455 | - | |
456 | - long counter = 1; | |
457 | - Stats allDataStats = new Stats(); allDataStats.reset(); | |
458 | - allDataStats.setAllDataStartNanoTime(); allDataStats.clock(); | |
459 | - | |
460 | - log("\r\nStart Brute force testing " + lines + " passwords...\r\n\r\n", false, true, true, false, false); | |
461 | - try | |
450 | +// Validate.isValidFile(UI ui, String caller, Path targetSourcePath, boolean isKey, boolean device, long minSize, boolean symlink, boolean writable, boolean report) | |
451 | + FCPath dictFileFCPath = Validate.getFCPath(ui, "NA", Paths.get(dictionaryFilePathString), false, Paths.get(dictionaryFilePathString), false, true); | |
452 | + if ( ( dictFileFCPath.exist ) && (dictFileFCPath.isValidFile) && (dictFileFCPath.isReadable) && ( dictFileFCPath.size > 0) ) | |
462 | 453 | { |
463 | - pwloop: for (String pwdString:Files.readAllLines(dictFilePath)) | |
454 | + int lines = 0; | |
455 | + try { lines = Files.readAllLines(dictFileFCPath.path).size(); } catch (IOException ex) { log("Files.readAllLines(" + dictFileFCPath.path.toAbsolutePath().toString() + ").size();" + ex.getMessage(), false, true, true, true, false); } | |
456 | + | |
457 | + long counter = 1; | |
458 | + Stats allDataStats = new Stats(); allDataStats.reset(); | |
459 | + allDataStats.setAllDataStartNanoTime(); allDataStats.clock(); | |
460 | + | |
461 | + log("\r\nStart Brute force testing " + lines + " passwords...\r\n\r\n", false, true, true, false, false); | |
462 | + try | |
464 | 463 | { |
465 | - pwd = pwdString; | |
466 | - MessageDigest messageDigest = null; try { messageDigest = MessageDigest.getInstance(FinalCrypt.HASH_ALGORITHM_NAME); } catch (NoSuchAlgorithmException ex) { log("Error: NoSuchAlgorithmException: MessageDigest.getInstance(\" "+ FinalCrypt.HASH_ALGORITHM_NAME + "\")\r\n", true, true, true, true, false);} | |
467 | - messageDigest.update(pwd.getBytes()); | |
468 | - byte[] hashBytes = messageDigest.digest(); | |
469 | - pwdBytes = GPT.hex2Bytes(getHexString(hashBytes,2)); | |
470 | - | |
471 | - finalCrypt.setPwd(pwd); | |
472 | - finalCrypt.setPwdBytes(pwd); | |
473 | - | |
474 | - targetFCPathList = new FCPathList<FCPath>(); | |
475 | - Validate.buildSelection(this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, false); | |
476 | - pathlistloop: for (FCPath fcPathItem : targetFCPathList) | |
464 | + pwloop: for (String pwdString:Files.readAllLines(dictFileFCPath.path)) | |
477 | 465 | { |
478 | - log(counter + " testing target: \"" + fcPathItem.path.toAbsolutePath().toString() + "\" password: \"" + pwd + "\" result: " + fcPathItem.isDecryptable + "\r\n", false, true, true, false, false); | |
479 | - if (fcPathItem.isDecryptable) { break pwloop; } | |
480 | - counter++; | |
481 | - } | |
482 | - } | |
466 | + pwd = pwdString; | |
467 | + MessageDigest messageDigest = null; try { messageDigest = MessageDigest.getInstance(FinalCrypt.HASH_ALGORITHM_NAME); } catch (NoSuchAlgorithmException ex) { log("Error: NoSuchAlgorithmException: MessageDigest.getInstance(\" "+ FinalCrypt.HASH_ALGORITHM_NAME + "\")\r\n", true, true, true, true, false);} | |
468 | + messageDigest.update(pwd.getBytes()); | |
469 | + byte[] hashBytes = messageDigest.digest(); | |
470 | + pwdBytes = GPT.hex2Bytes(getHexString(hashBytes,2)); | |
471 | + | |
472 | + finalCrypt.setPwd(pwd); | |
473 | + finalCrypt.setPwdBytes(pwd); | |
474 | + | |
475 | + targetFCPathList = new FCPathList<FCPath>(); | |
476 | + Validate.buildSelection(this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, false); | |
477 | + pathlistloop: for (FCPath fcPathItem : targetFCPathList) | |
478 | + { | |
479 | + log(counter + " testing target: \"" + fcPathItem.path.toAbsolutePath().toString() + "\" password: \"" + pwd + "\" result: " + fcPathItem.isDecryptable + "\r\n", false, true, true, false, false); | |
480 | + if (fcPathItem.isDecryptable) { break pwloop; } | |
481 | + counter++; | |
482 | + } | |
483 | + } | |
484 | + } | |
485 | + catch (IOException ex) { log("Files.readAllLines(" + dictFileFCPath.path + ");" + ex.getMessage(), false, true, true, true, false); } | |
486 | + allDataStats.setAllDataEndNanoTime(); allDataStats.clock(); | |
487 | + log("\r\nFinished Brute force testing " + (counter - 1) + " / " + lines + " passwords in " + allDataStats.getElapsedTime(allDataStats.getAllDataEndEpoch() - allDataStats.getAllDataStartEpoch()) + " " + allDataStats.getBruteForceThroughPut(counter, allDataStats.getAllDataEndEpoch() - allDataStats.getAllDataStartEpoch()) + "\r\n\r\n", false, true, true, false, false); | |
488 | + } | |
489 | + else | |
490 | + { | |
491 | + log("\r\nWarning: dictionary file: " + dictFileFCPath.path.toAbsolutePath().toString() + " is not a valid file!\r\n\r\n", false, true, true, false, false); | |
492 | + log(dictFileFCPath.getString() + "\r\n", false, true, true, false, false); | |
483 | 493 | } |
484 | - catch (IOException ex) { log("Files.readAllLines(" + dictFilePath + ");" + ex.getMessage(), false, true, true, true, false); } | |
485 | - allDataStats.setAllDataEndNanoTime(); allDataStats.clock(); | |
486 | - log("\r\nFinished Brute force testing " + counter + " / " + lines + " passwords in " + allDataStats.getElapsedTime(allDataStats.getAllDataEndEpoch() - allDataStats.getAllDataStartEpoch()) + " " + allDataStats.getBruteForceThroughPut(counter, allDataStats.getAllDataEndEpoch() - allDataStats.getAllDataStartEpoch()) + "\r\n\r\n", false, true, true, false, false); | |
487 | 494 | } |
488 | 495 | else |
489 | 496 | { |
490 | - log("Warning: dictionary file: " + dictionaryFilePathString + " is not a valid file!\r\n", false, true, true, false, false); | |
497 | + log("\r\nWarning: No valid target files found\r\n\r\n", false, true, true, false, false); | |
498 | + log(targetFCPathList.getStats() + "\r\n", false, true, true, false, false); | |
491 | 499 | } |
500 | + | |
492 | 501 | System.exit(0); |
493 | 502 | } |
494 | 503 | else |
495 | 504 | { |
496 | 505 | log("\r\nScanning files... ", false, true, true, false, false); |
497 | - // buildTargetSelection(UI ui, ArrayList<Path> userSelectedItemsPathList, Path keyPath, ArrayList<FCPath> targetFCPathList, boolean symlink, String pattern, boolean negatePattern, boolean disabledMAC, boolean status) | |
498 | - Validate.buildSelection(this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, false); | |
506 | +// Validate.buildSelection(UI ui, ArrayList<Path> userSelectedItemsPathList, Path keyPath, ArrayList<FCPath> targetFCPathList, boolean symlink, String pattern, boolean negatePattern, boolean disabledMAC, boolean status) | |
507 | + Validate.buildSelection( this, targetPathList, keyFCPath, targetFCPathList, symlink, pattern, negatePattern, finalCrypt.disabledMAC, false); | |
499 | 508 | log("Finished Brute force testing \r\n\r\n", false, true, true, false, false); |
500 | 509 | } |
501 | 510 | |
502 | 511 | |
503 | 512 | if ( scan ) |
504 | 513 | { |
505 | - for (FCPath fcPathItem : targetFCPathList) | |
506 | - { | |
507 | - log(fcPathItem.getString() + "\r\n", false, true, true, false, false); | |
508 | - } | |
509 | - System.exit(0); | |
514 | + for (FCPath fcPathItem : targetFCPathList) | |
515 | + { | |
516 | + log(fcPathItem.getString() + "\r\n", false, true, true, false, false); | |
517 | + } | |
518 | + log("=========================================\r\n\r\n", false, true, true, false, false); | |
519 | + log(targetFCPathList.getStats() + "\r\n", false, true, true, false, false); | |
520 | + System.exit(0); | |
510 | 521 | } |
511 | 522 | |
512 | 523 | /////////////////////////////////////////////// SET BUILD MODES //////////////////////////////////////////////////// |
513 | 524 | |
514 | -// if ((keyFCPath != null) && ((keyFCPath.isValidKey) || (keyFCPath.isValidKeyDir))) | |
515 | - if ( | |
516 | - ((keyFCPath != null) && (keyFCPath.isKey) && (keyFCPath.isValidKey)) | |
517 | - || ((keyFCPath != null) && (keyFCPath.type == FCPath.DIRECTORY) && (keyFCPath.isValidKeyDir)) | |
518 | - ) | |
525 | + if ( | |
526 | + ((keyFCPath != null) && (keyFCPath.isKey) && (keyFCPath.isValidKey)) | |
527 | + || ((keyFCPath != null) && (keyFCPath.type == FCPath.DIRECTORY) && (keyFCPath.isValidKeyDir)) | |
528 | + ) | |
519 | 529 | { |
520 | 530 | |
521 | 531 | // ================================================================================================================================================================================================ |
@@ -775,16 +785,18 @@ public class CLUI implements UI | ||
775 | 785 | log(" java -cp finalcrypt.jar rdj/CLUI --decrypt -k \"key_file\" -t \"target_file\" # Decrypt (Manual Key Mode not recommended)\r\n", false, true, false, false, false); |
776 | 786 | log("\r\n", false, true, false, false, false); |
777 | 787 | log("Mode:\r\n", false, true, false, false, false); |
778 | - log(" <--scan> -k \"key_dir\" -t \"target\" Print scan results and quit.\r\n", false, true, false, false, false); | |
779 | - log(" <--encrypt> -k \"key_dir\" -t \"target\" Encrypt Targets.\r\n", false, true, false, false, false); | |
780 | - log(" <--decrypt> -k \"key_dir\" -t \"target\" Decrypt Targets.\r\n", false, true, false, false, false); | |
781 | - log(" <--create-keydev> -k \"key_file\" -t \"target\" Create Key Device (only unix).\r\n", false, true, false, false, false); | |
788 | + log("\r\n", false, true, false, false, false); | |
789 | + log(" <--scan> -k \"key_dir\" -t \"target\" Print scan results and quit.\r\n", false, true, false, false, false); | |
790 | + log(" <--encrypt> -k \"key_dir\" -t \"target\" Encrypt Targets.\r\n", false, true, false, false, false); | |
791 | + log(" <--decrypt> -k \"key_dir\" -t \"target\" Decrypt Targets.\r\n", false, true, false, false, false); | |
792 | + log(" <--create-keydev> -k \"key_file\" -t \"target\" Create Key Device (only unix).\r\n", false, true, false, false, false); | |
782 | 793 | log(" <--create-keyfile> -K \"key_file\" -S \"Size (bytes)\" Create OTP Key File.\r\n", false, true, false, false, false); |
783 | 794 | log(" <--clone-keydev> -k \"source_device\" -t \"target_device\" Clone Key Device (only unix).\r\n", false, true, false, false, false); |
784 | - log(" [--print-gpt] -t \"target_device\" Print GUID Partition Table.\r\n", false, true, false, false, false); | |
785 | - log(" [--delete-gpt] -t \"target_device\" Delete GUID Partition Table (DATA LOSS!).\r\n", false, true, false, false, false); | |
795 | + log(" [--print-gpt] -t \"target_device\" Print GUID Partition Table.\r\n", false, true, false, false, false); | |
796 | + log(" [--delete-gpt] -t \"target_device\" Delete GUID Partition Table (DATA LOSS!).\r\n", false, true, false, false, false); | |
786 | 797 | log("\r\n", false, true, false, false, false); |
787 | 798 | log("Options:\r\n", false, true, false, false, false); |
799 | + log("\r\n", false, true, false, false, false); | |
788 | 800 | log(" [-h] [--help] Print help page.\r\n", false, true, false, false, false); |
789 | 801 | log(" [--password] -p \'password\' Optional password (non-interactive).\r\n", false, true, false, false, false); |
790 | 802 | log(" [--password-prompt] -pp Optional password (safe interactive prompt).\r\n", false, true, false, false, false); |
@@ -113,6 +113,43 @@ public class FCPath | ||
113 | 113 | // public static String getKeySelectedDescription() { return FCPath.ITEMSELECTDESCRIPTION[type]; } |
114 | 114 | public static String getTypeString(int type) { return FCPath.TYPE_DESCRIPTION_ARRAY[type]; } |
115 | 115 | |
116 | - public String getString() {return Validate.getSting(this); } | |
116 | +// public String getString() {return Validate.getSting(this); } | |
117 | + public String getString() | |
118 | + { | |
119 | + String returnString = ""; | |
120 | + returnString += "FCPath:\r\n"; | |
121 | + returnString += "\r\n"; | |
122 | + returnString += "Path: " + path.toAbsolutePath().toString() + "\r\n"; | |
123 | + returnString += "Exist: " + exist + "\r\n"; | |
124 | + returnString += "Type: " + getTypeString(type) + "\r\n"; | |
125 | + returnString += "Size: " + Validate.getHumanSize(size, 1,"Bytes") + "\r\n"; | |
126 | + returnString += "Readable: " + isReadable + "\r\n"; | |
127 | + returnString += "Writable: " + isWritable + "\r\n"; | |
128 | + returnString += "Hidden: " + isHidden + "\r\n"; | |
129 | + returnString += "Match Key: " + matchKey + "\r\n"; | |
130 | + returnString += "\r\n"; | |
131 | + returnString += "Valid Path: " + isValidPath + "\r\n"; | |
132 | + returnString += "Valid File: " + isValidFile + "\r\n"; | |
133 | + returnString += "Valid Device: " + isValidDevice + "\r\n"; | |
134 | + returnString += "Valid Partition: " + isValidPartition + "\r\n"; | |
135 | + returnString += "Is Key: " + isKey + "\r\n"; | |
136 | + returnString += "Valid Key: " + isValidKey + "\r\n"; | |
137 | + returnString += "\r\n"; | |
138 | + returnString += "Decrypted: " + isDecrypted + "\r\n"; | |
139 | + returnString += "Encryptable: " + isEncryptable + "\r\n"; | |
140 | +// returnString += "New Encrypted: " + isNewEncrypted + "\r\n"; | |
141 | + returnString += "UnEncryptable: " + isUnEncryptable + "\r\n"; | |
142 | + returnString += "\r\n"; | |
143 | +// returnString += "Has FCToken: " + hasFCToken + "\r\n"; | |
144 | + returnString += "Encrypted: " + isEncrypted + "\r\n"; | |
145 | + returnString += "MAC Version: " + macVersion + "\r\n"; | |
146 | +// returnString += "Authenticated: " + isAuthenticated + "\r\n"; | |
147 | + returnString += "Decryptable: " + isDecryptable + "\r\n"; | |
148 | +// returnString += "New Decrypted: " + isNewDecrypted + "\r\n"; | |
149 | + returnString += "UnDecryptable: " + isUnDecryptable + "\r\n"; | |
150 | + returnString += "\r\n"; | |
151 | + | |
152 | + return returnString; | |
153 | + } | |
117 | 154 | |
118 | 155 | } |
@@ -1 +1 @@ | ||
1 | -5.6.0 | |
\ No newline at end of file | ||
1 | +5.6.1 | |
\ No newline at end of file |
@@ -1,4 +1,4 @@ | ||
1 | -[Version] = {5.6.0} | |
1 | +[Version] = {5.6.1} | |
2 | 2 | [] = {} ================================================================ |
3 | 3 | [Release Notes] = {You are using a very old version of FinalCrypt} |
4 | 4 | [Release Message] = {Please visit the website and download the latest} |
@@ -8,7 +8,7 @@ | ||
8 | 8 | [] = {} ================================================================ |
9 | 9 | [Version Notes] = {Version 5} |
10 | 10 | [Version Notes] = {} |
11 | -[Version Notes] = { New: Auto Key Mode on One-Time Pad Encryption} | |
11 | +[Version Notes] = {New: Auto Key Mode on One-Time Pad Encryption} | |
12 | 12 | [Version Notes] = {} |
13 | 13 | [] = {} ---------------------------------------------------------------- |
14 | 14 | [Upgrade Notes] = {Upgrade 6} |
@@ -19,9 +19,9 @@ | ||
19 | 19 | [Upgrade Notes] = {Brute Force only works on the Command Line Interface} |
20 | 20 | [Upgrade Notes] = {} |
21 | 21 | [] = {} ---------------------------------------------------------------- |
22 | -[Update Notes] = {Update 0} | |
22 | +[Update Notes] = {Update 1} | |
23 | 23 | [Update Notes] = {} |
24 | -[Update Notes] = { No updates} | |
24 | +[Update Notes] = {Improved Brute Force CLUI Validation and Statistics} | |
25 | 25 | [] = {} -------------------------------------------------------------------------------------------------------- |
26 | 26 | [Alert Subject_] = {} |
27 | 27 | [Alert Notes_] = {} |
@@ -544,44 +544,6 @@ public class Validate | ||
544 | 544 | FCPath fcPath = new FCPath( path, exist, type, size, readable, writable, isHidden, matchKey, isValid, isValidFile, isValidDeviceProtected, isValidDevice, isValidPartition, isKey, isValidKey, isValidKeyDir, isDecrypted, isEncryptable, needsWriteAutoKey, needsWriteAutoKeySize, matchedReadAutoKey, matchedReadAutoKeySize, isNewEncrypted, isUnEncryptable, isEncrypted, macVersion, isDecryptable, isNewDecrypted, isUnDecryptable, errorDesc); |
545 | 545 | return fcPath; |
546 | 546 | } |
547 | - | |
548 | - public static String getSting(FCPath fcPath) | |
549 | - { | |
550 | - String returnString = ""; | |
551 | - returnString += "FCPath:\r\n"; | |
552 | - returnString += "\r\n"; | |
553 | - returnString += "Path: " + fcPath.path.toAbsolutePath().toString() + "\r\n"; | |
554 | - returnString += "Exist: " + fcPath.exist + "\r\n"; | |
555 | - returnString += "Type: " + fcPath.getTypeString(fcPath.type) + "\r\n"; | |
556 | - returnString += "Size: " + Validate.getHumanSize(fcPath.size, 1,"Bytes") + "\r\n"; | |
557 | - returnString += "Readable: " + fcPath.isReadable + "\r\n"; | |
558 | - returnString += "Writable: " + fcPath.isWritable + "\r\n"; | |
559 | - returnString += "Hidden: " + fcPath.isHidden + "\r\n"; | |
560 | - returnString += "Match Key: " + fcPath.matchKey + "\r\n"; | |
561 | - returnString += "\r\n"; | |
562 | - returnString += "Valid Path: " + fcPath.isValidPath + "\r\n"; | |
563 | - returnString += "Valid File: " + fcPath.isValidFile + "\r\n"; | |
564 | - returnString += "Valid Device: " + fcPath.isValidDevice + "\r\n"; | |
565 | - returnString += "Valid Partition: " + fcPath.isValidPartition + "\r\n"; | |
566 | - returnString += "Is Key: " + fcPath.isKey + "\r\n"; | |
567 | - returnString += "Valid Key: " + fcPath.isValidKey + "\r\n"; | |
568 | - returnString += "\r\n"; | |
569 | - returnString += "Decrypted: " + fcPath.isDecrypted + "\r\n"; | |
570 | - returnString += "Encryptable: " + fcPath.isEncryptable + "\r\n"; | |
571 | - returnString += "New Encrypted: " + fcPath.isNewEncrypted + "\r\n"; | |
572 | - returnString += "UnEncryptable: " + fcPath.isUnEncryptable + "\r\n"; | |
573 | - returnString += "\r\n"; | |
574 | -// returnString += "Has FCToken: " + fcPath.hasFCToken + "\r\n"; | |
575 | - returnString += "Encrypted: " + fcPath.isEncrypted + "\r\n"; | |
576 | - returnString += "MAC Version: " + fcPath.macVersion + "\r\n"; | |
577 | -// returnString += "Authenticated: " + fcPath.isAuthenticated + "\r\n"; | |
578 | - returnString += "Decryptable: " + fcPath.isDecryptable + "\r\n"; | |
579 | - returnString += "New Decrypted: " + fcPath.isNewDecrypted + "\r\n"; | |
580 | - returnString += "UnDecryptable: " + fcPath.isUnDecryptable + "\r\n"; | |
581 | - returnString += "\r\n"; | |
582 | - | |
583 | - return returnString; | |
584 | - } | |
585 | 547 | |
586 | 548 | synchronized public static String getFCPathStatus(FCPath fcPath) |
587 | 549 | { |