How to do encryption for char using java?
public String getEncryption(String text){
String x = "";
for(int i = 0; i < text.length(); i++){
String sub = text.substring(i, i+1);
System.out.println(i + " = " + sub);
String en = encrypt_code[Integer.parseInt(sub)];
System.out.println("Result:" + en);
x = x.concat(en);
}
return x;
}
how do I convert this to charAt?
I have this so far:
public String getEncryption2(String text){
String x = "";
for(int I = 0; I < text.length(); I++){
char ch = text.charAt(I);