code: private static String cryptDES(String string, int opmode, String key) throws NoSuchAlgorithmException,
              NoSuchPaddingException, InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException,
              BadPaddingException {
          String result = "";
          int isInit = "DES".equals(key) ? DES : ("AES".equals(key) ? AES : ("RSA".equals(key) ? RSA : DES3));
          if (isInit == 1 || initDES(key) || initDES(key)) {
              if (DES_CRYPT_WAY.equals(key)) {
                  cipher.init(opmode, secretKey);
                  result = new String(cipher.doFinal(string.getBytes("ISO-8859-1")), "ISO-8859-1");
              } else if (DES3_CRYPT_WAY.equals(key)) {
                  cipher3.init(opmode, secretKey3);
                  result = new String(cipher3.doFinal(string.getBytes("ISO-8859-1")), "ISO-8859-1");
              } else if (AES_CRYPT_WAY.equals(key)) {
                  aes.init(opmode, aesKey);
                  result = new String(aes.doFinal(string.getBytes("ISO-8859-1")), "ISO-8859-1");
              } else {
                  rsa.init(opmode, opmode == Cipher.ENCRYPT_MODE ? (RSAPublicKey) rsaKey.getPublic() : (RSAPrivateKey)
                          rsaKey.getPrivate());
                  result = new String(rsa.doFinal(string.getBytes("ISO-8859-1")), "ISO-8859-1");
              }
          }
          return result;
      }
docs: Cipher加密解密器
  
  @param string {@link String}
  @param opmode {@link Integer}
  @param key {@link String}
  
  @return {@link String}
  
  @throws NoSuchPaddingException 异常
  @throws NoSuchAlgorithmException 异常
  @throws InvalidKeyException 异常
  @throws BadPaddingException 异常
  @throws IllegalBlockSizeException 异常
  @throws UnsupportedEncodingException 异常