From 4c309352edbe3f10db416e152689a47b80760023 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 17 Mar 2022 18:03:10 +0100 Subject: [PATCH] fix formatting --- src/main/java/ch/fhnw/kry/Main.java | 5 +++-- src/main/java/ch/fhnw/kry/SPN.java | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ch/fhnw/kry/Main.java b/src/main/java/ch/fhnw/kry/Main.java index 2df47b5..e260c3d 100644 --- a/src/main/java/ch/fhnw/kry/Main.java +++ b/src/main/java/ch/fhnw/kry/Main.java @@ -6,9 +6,10 @@ package ch.fhnw.kry; public class Main { private static final String KEY = "00111010100101001101011000111111"; - private static final String CHIFFRE = "00000100110100100000101110111000000000101000111110001110011111110110000001010001010000111010000000010011011001110010101110110000"; + private static final String CHIFFRE = + "00000100110100100000101110111000000000101000111110001110011111110110000001010001010000111010000000010011011001110010101110110000"; - public static void main(String[] args) { + public static void main(String[] args) { } } diff --git a/src/main/java/ch/fhnw/kry/SPN.java b/src/main/java/ch/fhnw/kry/SPN.java index cbcbfd2..e76fc1f 100644 --- a/src/main/java/ch/fhnw/kry/SPN.java +++ b/src/main/java/ch/fhnw/kry/SPN.java @@ -1,7 +1,7 @@ package ch.fhnw.kry; import java.util.Map; -import java.util.HashMap; + import static java.util.Map.entry; public class SPN { @@ -26,11 +26,11 @@ public class SPN { ); public String decrypt(int key, String chiffre) { - + return null; } - public int sp (int key, int x) { + public int sp(int key, int x) { x = init(key, x); return x; @@ -45,7 +45,7 @@ public class SPN { public int init(int key, int x) { return x ^ k(key, 4); - } + } public int substitution(int x) { int mask = 0xF000; @@ -70,5 +70,4 @@ public class SPN { return x; } - }