code: public static String decryptToAes(String content, String pwd) {
          if (StringUtil.isEmpty(content) || StringUtil.isEmpty(pwd)) {
              return null;
          }
          try {
              SecretKeySpec key = new SecretKeySpec(getKey(pwd).getEncoded(), AES);
              Cipher cipher = Cipher.getInstance(AES);
              cipher.init(Cipher.DECRYPT_MODE, key);
              byte[] result = cipher.doFinal(hexToByte(content));
              return new String(result);
          } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | BadPaddingException | IllegalBlockSizeException e) {
              LOG.error(e);
          }
          return null;
      }
docs: AES解密