|
@ -29,18 +29,18 @@ public class Crypt { |
|
|
String password = ""; |
|
|
String password = ""; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
workingobjekt.setOffen(eingabe); |
|
|
|
|
|
workingobjekt.setPassword(password); |
|
|
|
|
|
workingobjekt.entschlüsseln(); |
|
|
|
|
|
} catch (GeneralSecurityException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
workingobjekt.setOffen(eingabe); |
|
|
|
|
|
workingobjekt.setPassword(password); |
|
|
|
|
|
workingobjekt.entschlüsseln(); |
|
|
|
|
|
} catch (GeneralSecurityException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ergebnis = workingobjekt.getVerschlüsselt(); |
|
|
ergebnis = workingobjekt.getVerschlüsselt(); |
|
|
|
|
|
|
|
|
assertNotEquals("unterschidliche Texte",eingabe,ergebnis); |
|
|
|
|
|
|
|
|
assertNotEquals("unterschidliche Texte", eingabe, ergebnis); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
@ -60,7 +60,7 @@ public class Crypt { |
|
|
} |
|
|
} |
|
|
ergebnis = workingobjekt.getOffen(); |
|
|
ergebnis = workingobjekt.getOffen(); |
|
|
|
|
|
|
|
|
assertEquals("das entschlüsselte Test Wort",ergebnis,eingabe); |
|
|
|
|
|
|
|
|
assertEquals("das entschlüsselte Test Wort", ergebnis, eingabe); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |