26 lines
753 B
Java
26 lines
753 B
Java
package ch.fhnw.kry;
|
|
|
|
/**
|
|
* Entry point for mada-kry.
|
|
*/
|
|
public class Main {
|
|
|
|
static final String KEY = "00111010100101001101011000111111";
|
|
static final String CIPHER =
|
|
"00000100110100100000101110111000000000101000111110001110011111110110000001010001010000111010000000010011011001110010101110110000";
|
|
|
|
static final int BLOCK_LENGTH = 16;
|
|
|
|
/**
|
|
* Decrypt {@link Main#CIPHER} with {@link Main#KEY}.
|
|
* <p>
|
|
* In a real program we would read those from files or command line arguments.
|
|
*
|
|
* @param args Command line arguments.
|
|
*/
|
|
public static void main(String[] args) {
|
|
var decrypt = new Decrypt();
|
|
System.out.printf("decrypted message: %s%n", decrypt.decrypt(KEY, CIPHER));
|
|
}
|
|
}
|