暗号化の基礎の基礎といえばこれか。
public class Rot13{
 public static void main(String[] args){
  byte[] rot = args[0].getBytes();
   // 暗号化
   for(int i = 0; i < rot.length; i++){
    rot[i] += 0x13;
   }
   System.out.println(new String(rot));

   // 復号化
   for(int i = 0; i < rot.length; i++){
    rot[i] -= 0x13;
   }
   System.out.println(new String(rot));
  }
 }
}
実行結果
% java Rot13 hogeほげ
{?x菩陛
hogeほげ