Commit 6f54dcaf5a557e15d66df1f62ef578b8fcd5bd02

Authored by prolly
1 parent 6809e347

Siste endring. :)

.classpath
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<classpath>
3   - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
4   - <classpathentry kind="src" path="src"/>
5   - <classpathentry kind="lib" path="/Users/margerbjo/git/Oblig5/commons-codec-1.11.jar"/>
6   - <classpathentry kind="output" path="bin"/>
7   -</classpath>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
  4 + <classpathentry kind="src" path="src"/>
  5 + <classpathentry kind="lib" path="C:/Users/paul/eclipse-workspace/commons-codec-1.11/commons-codec-1.11.jar"/>
  6 + <classpathentry kind="output" path="bin"/>
  7 +</classpath>
... ...
hashfil.txt
1   -files/secondFolder/phones.txt,9ce6a51fe5769a96c7caa33169c77c83b9785ae4f75b05d3ce8d68bd08c8a723files/firstFolder/names.txt,59f627f0b0b42327917128abb4a71486f57642807fcba6b58414a12fe9670b43
2   -files/firstFolder/testFile.txt,a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
3 1 \ No newline at end of file
  2 +files\firstFolder\names.txt, 59f627f0b0b42327917128abb4a71486f57642807fcba6b58414a12fe9670b43
  3 +files\firstFolder\test.txt, 321a63925004e4efc2445e8519b77151bed3a93793ea4bbbeea12863acd9e923
  4 +files\secondFolder\phones.txt, 9ce6a51fe5769a96c7caa33169c77c83b9785ae4f75b05d3ce8d68bd08c8a723
4 5 \ No newline at end of file
... ...
signedhash
No preview for this file type
src/hashObl5/ExecutableFiles.java
... ... @@ -96,15 +96,15 @@ public class ExecutableFiles extends Object {
96 96 BufferedReader bufferedReader = new BufferedReader(fileReader);
97 97  
98 98 while((line = bufferedReader.readLine()) != null) {
99   - data.append(line);
  99 + data.append(line+System.getProperty("line.separator"));
100 100 }
101 101  
102 102 FileWriter fileWriter = new FileWriter(fileName);
103 103  
104 104 BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
105 105  
106   - data.append("\n");
107   - data.append(absolutePath + "," + apache_sha256);
  106 +
  107 + data.append(absolutePath + ", " + apache_sha256);
108 108  
109 109 bufferedWriter.write(data.toString());
110 110  
... ... @@ -258,7 +258,7 @@ public class ExecutableFiles extends Object {
258 258 }
259 259  
260 260 if(storage.containsKey(file.getPath())) {
261   - if(storage.get(file.getPath()).equals(apache_sha256)) {
  261 + if(storage.get(file.getPath()).contains(apache_sha256)) {
262 262 return true;
263 263 }
264 264 }
... ...
test 0 → 100644
No preview for this file type