|
11 | 11 | public class Sha3Test { |
12 | 12 |
|
13 | 13 |
|
14 | | - String apkAbsolutePath = "C:\\Users\\PERSONAL\\git\\MutAPK\\test\\temp"; |
15 | | - File manifest = new File(apkAbsolutePath + File.separator + "AndroidManifest.xml"); |
16 | | - File smali = new File(apkAbsolutePath + File.separator + "smali"); |
17 | | - File resource = new File(apkAbsolutePath + File.separator + "res"); |
18 | | - |
19 | | - @Test |
20 | | - public void equalHashTest() throws FileNotFoundException, IOException { |
21 | | - String hashManifest = Sha3.sha512FileSeparte(manifest); |
22 | | - String hashSmali = Sha3.sha512FileSeparte(smali); |
23 | | - String hashResource = Sha3.sha512FileSeparte(resource); |
24 | | - |
25 | | - String hashManifestCompare = ""; |
26 | | - String hashSmaliCompare = ""; |
27 | | - String hashResourceCompare = ""; |
28 | | - |
29 | | - for (int i = 0; i < 10; i++) { |
30 | | - hashManifestCompare = Sha3.sha512FileSeparte(manifest); |
31 | | - hashSmaliCompare = Sha3.sha512FileSeparte(smali); |
32 | | - hashResourceCompare = Sha3.sha512FileSeparte(resource); |
33 | | - |
34 | | - if(!hashManifest.equals(hashManifestCompare)) { |
35 | | - fail("They should be always equals"); |
36 | | - } |
37 | | - if(!hashSmali.equals(hashSmaliCompare)) { |
38 | | - fail("They should be always equals"); |
39 | | - } |
40 | | - if(!hashResource.equals(hashResourceCompare)) { |
41 | | - fail("They should be always equals"); |
42 | | - } |
43 | | - } |
44 | | - } |
| 14 | +// String apkAbsolutePath = "C:\\Users\\PERSONAL\\git\\MutAPK\\test\\temp"; |
| 15 | +// File manifest = new File(apkAbsolutePath + File.separator + "AndroidManifest.xml"); |
| 16 | +// File smali = new File(apkAbsolutePath + File.separator + "smali"); |
| 17 | +// File resource = new File(apkAbsolutePath + File.separator + "res"); |
| 18 | +// |
| 19 | +// @Test |
| 20 | +// public void equalHashTest() throws FileNotFoundException, IOException { |
| 21 | +// String hashManifest = Sha3.sha512FileSeparte(manifest); |
| 22 | +// String hashSmali = Sha3.sha512FileSeparte(smali); |
| 23 | +// String hashResource = Sha3.sha512FileSeparte(resource); |
| 24 | +// |
| 25 | +// String hashManifestCompare = ""; |
| 26 | +// String hashSmaliCompare = ""; |
| 27 | +// String hashResourceCompare = ""; |
| 28 | +// |
| 29 | +// for (int i = 0; i < 10; i++) { |
| 30 | +// hashManifestCompare = Sha3.sha512FileSeparte(manifest); |
| 31 | +// hashSmaliCompare = Sha3.sha512FileSeparte(smali); |
| 32 | +// hashResourceCompare = Sha3.sha512FileSeparte(resource); |
| 33 | +// |
| 34 | +// if(!hashManifest.equals(hashManifestCompare)) { |
| 35 | +// fail("They should be always equals"); |
| 36 | +// } |
| 37 | +// if(!hashSmali.equals(hashSmaliCompare)) { |
| 38 | +// fail("They should be always equals"); |
| 39 | +// } |
| 40 | +// if(!hashResource.equals(hashResourceCompare)) { |
| 41 | +// fail("They should be always equals"); |
| 42 | +// } |
| 43 | +// } |
| 44 | +// } |
45 | 45 |
|
46 | 46 | } |
0 commit comments