Information and Network Security: 1. Statement
Information and Network Security: 1. Statement
Output:
package mono;
import java.util.Scanner;
System.out.println("Enter PT:");
input = sc.next();
//System.out.println("Line:"+input);
//Decipher
char[] DCT = new char[CT.length];
for (int i = 0; i < CT.length; i++) {
for (int j = 0; j < ar.length; j++) {
if (ar[j]==(CT[i])) {
DCT[i]=(char)(j+97);
}
}
System.out.println("PlainText is:\n"+new
String(DCT));
}
Output:
Enter PT:
hello
Cipher Text is:
dkeex
PlainText is:
Hello