fix formatting

This commit is contained in:
Sebastian Hugentobler 2022-03-17 18:03:10 +01:00
parent 115ed2efbf
commit 4c309352ed
2 changed files with 7 additions and 7 deletions

View File

@ -6,9 +6,10 @@ package ch.fhnw.kry;
public class Main { public class Main {
private static final String KEY = "00111010100101001101011000111111"; 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) {
} }
} }

View File

@ -1,7 +1,7 @@
package ch.fhnw.kry; package ch.fhnw.kry;
import java.util.Map; import java.util.Map;
import java.util.HashMap;
import static java.util.Map.entry; import static java.util.Map.entry;
public class SPN { public class SPN {
@ -26,11 +26,11 @@ public class SPN {
); );
public String decrypt(int key, String chiffre) { public String decrypt(int key, String chiffre) {
return null; return null;
} }
public int sp (int key, int x) { public int sp(int key, int x) {
x = init(key, x); x = init(key, x);
return x; return x;
@ -45,7 +45,7 @@ public class SPN {
public int init(int key, int x) { public int init(int key, int x) {
return x ^ k(key, 4); return x ^ k(key, 4);
} }
public int substitution(int x) { public int substitution(int x) {
int mask = 0xF000; int mask = 0xF000;
@ -70,5 +70,4 @@ public class SPN {
return x; return x;
} }
} }