forked from hridayK/Java-Cryptography
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
51 lines (41 loc) · 1.55 KB
/
Main.java
File metadata and controls
51 lines (41 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.text.NumberFormat.Style;
import java.util.*;
public class Main {
public static void main(String[] args) {
//Scanner sc = new Scanner(System.in);
// System.out.println("Enter the Message ");
//String message = sc.nextLine();
//Testing for Caesar Cipher
/*Caesar cs = new Caesar();
int key = (int) (Math.random() * 10000);
String x = cs.encrypt(message, key);
System.out.println(x);
String y = cs.decrypt(x, key);
System.out.println(y);
String [] possible = new String[26];
possible = cs.bruteForce(x);
System.out.println("The possible message is:");
display(possible);*/
//Testing for Hill Cipher
// Hill obj = new Hill();
// obj.allstff();
// VigenereCipher vc = new VigenereCipher();
// String key;
// String message;
// System.out.println("\n\nEnter the Message to be Encrypted:\t");
// message = sc.nextLine();
// System.out.println("\n\nEnter the Encryption Key:\t");
// key = sc.nextLine();
// String ensg = vc.en(message, key);
// System.out.println("\n\nString: " + message);
// System.out.println("\n\nEncrypted message:\t" + ensg);
// System.out.println("\n\nDecrypted message:\t" + vc.de(ensg, key));
}
static void display(String arr[]){
System.out.println();
for(int i = 0; i < arr.length; i++){
System.out.println(arr[i]);
System.out.println();
}
}
}