You can use the menubar and select 'Edit>New class...' and enter 'Cipher' for the name. Then open the editor for the class and remove EVERYTHING and replace it with the following:
This is slightly more simplified from my last code post.
public abstract class Cipher
{
public static char convertChar(char c, int offset)
{
if (c<=64 || (c>90 && c<=96) || c>122) return c;
int base = 32*((c-1)/32);
return (char)(base+1+(((c-1)-base+26+offset)%26));
}
public static String convertString(String str, int offset)
{
String converted = "";
for (int i=0; i<str.length(); i++) converted += convertChar(str.charAt(i), offset);
return converted;
}
}
