Have to implement the openssl function - PKCS5_PBKDF2_HMAC_SHA1(keyData, 8, salt, 8, iterCount, KEY_SIZE, key)) in Java.
Below is my code in Java
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
KeySpec spec = new PBEKeySpec(customerId.toCharArray(), RefundUtil.getSalt(), iterationCount, bitLength);
SecretKey tmp = factory.generateSecret(spec);
byte[] pbkdf2Key = tmp.getEncoded();
Is the above Java code correct?