code: public static Cipher getRSACipher (int mode, Key key)
      {
          try {
              Cipher cipher = Cipher.getInstance("RSA");
              cipher.init(mode, key);
              return cipher;
          } catch (GeneralSecurityException gse) {
              log.warning("Failed to create cipher", gse);
          }
          return null;
      }
docs: Creates our RSA cipher.