fix formatting
This commit is contained in:
parent
115ed2efbf
commit
4c309352ed
@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user