code: public static byte[] decryptPasswordBased(final String algorithm, final byte[] encryptedData, final char[] password, final byte[] salt,
              final int count) {
  
          checkNotNull("algorithm", algorithm);
          checkNotNull("encryptedData", encryptedData);
          checkNotNull("password", password);
          checkNotNull("salt", salt);
  
          try {
              final Cipher cipher = createCipher(algorithm, Cipher.DECRYPT_MODE, password, salt, count);
              return cipher.doFinal(encryptedData);
          } catch (final Exception ex) {
              throw new RuntimeException("Error decrypting the password!", ex);
          }
      }
docs: Decrypts some data based on a password.
  
  @param algorithm
  PBE algorithm like "PBEWithMD5AndDES" or "PBEWithMD5AndTripleDES" - Cannot be <code>null</code>.
  @param encryptedData
  Data to decrypt - Cannot be <code>null</code>.
  @param password
  Password - Cannot be <code>null</code>.
  @param salt
  Salt usable with algorithm - Cannot be <code>null</code>.
  @param count
  Iterations.
  
  @return Encrypted data.