code: private SecretKey generateAESKey(String privateKey, String salt) {
          try {
              byte[] raw = decodeHex(salt);
              KeySpec spec = new PBEKeySpec(privateKey.toCharArray(), raw, iterationCount, keySize);
              SecretKeyFactory factory = SecretKeyFactory.getInstance(PBKDF_2_WITH_HMAC_SHA_1);
              return new SecretKeySpec(factory.generateSecret(spec).getEncoded(), AES_ECB_ALGORITHM);
          } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
              throw new IllegalStateException(e);
          }
      }
docs: Generate the AES key from the salt and the private key.
  
  @param salt       the salt (hexadecimal)
  @param privateKey the private key
  @return the generated key.