code: private static boolean initDES(String key) throws NoSuchAlgorithmException, NoSuchPaddingException {
          Security.addProvider(new com.sun.crypto.provider.SunJCE());
          // DES、DESede、AES为对称加密，RSA为非对称加密
          if (DES_CRYPT_WAY.equals(key)) {
              KeyGenerator keygen = KeyGenerator.getInstance(key);
              secretKey = keygen.generateKey();
              cipher = Cipher.getInstance(key);
              DES = 1;
          } else if (DES3_CRYPT_WAY.equals(key)) {
              KeyGenerator keygen = KeyGenerator.getInstance(key);
              secretKey3 = keygen.generateKey();
              cipher3 = Cipher.getInstance(key);
              DES3 = 1;
          } else if (AES_CRYPT_WAY.equals(key)) {
              KeyGenerator keygen = KeyGenerator.getInstance(key);
              aesKey = keygen.generateKey();
              aes = Cipher.getInstance(key);
              AES = 1;
          } else {
              // RSA加密
              KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(key);
              keyPairGen.initialize(1024);
              rsaKey = keyPairGen.generateKeyPair();
              rsa = Cipher.getInstance(key);
              RSA = 1;
          }
          return true;
      }
docs: 初始化加密器，双向加密，不支持中文
  
  @param key {@link String}
  
  @return {@link Boolean}
  
  @throws NoSuchAlgorithmException 异常
  @throws NoSuchPaddingException 异常