Skip to content
Snippets Groups Projects
Commit 192db9c4 authored by Schlütter Yannik's avatar Schlütter Yannik
Browse files

Update: Code for working encryption while not interfering with already...

Update: Code for working encryption while not interfering with already encrypted code in CryptoUtils.java which has also been done for not yet pushed java Tests
parent b812e987
No related branches found
No related tags found
4 merge requests!74V1,!73Initial commit,!71Merge DataBase into Development,!8Merge database branch into development branch
......@@ -3,6 +3,7 @@ import de.hdm_stuttgart.battlearena.Model.DataStorage.Classes.Exceptions.CryptoE
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.Key;
......@@ -50,12 +51,14 @@ public class CryptoUtils{
//System.out.println(completeString);
parts = completeString.split(";");
//FileOutputStream outputStream = new FileOutputStream(outputFile);
//outputStream.write(outputBytes);
if(cipherMode == Cipher.ENCRYPT_MODE){
FileOutputStream outputStream = new FileOutputStream(inputFile);
outputStream.write(outputBytes);
outputStream.close();
}
inputStream.close();
//outputStream.close();
} catch (NoSuchPaddingException | NoSuchAlgorithmException
| InvalidKeyException | BadPaddingException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment