public static String encode(String s) { char[] Old = s.toCharArray(); char[] New = new char[Old.length]; int temp = 0; for(int i=0, n=Old.length; i<n; i++) { New[i] = Character.getNumericValue(Old[i]) + 13; } return new String(New); }