public static SecretKey getAESKeyFromPassword(final String password, final byte[] salt)
            throws NoSuchAlgorithmException, InvalidKeySpecException {
        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256");
        KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt, KEY_ITERATION_COUNT, KEY_LENGTH);

        return new SecretKeySpec(keyFactory.generateSecret(keySpec).getEncoded(), "AES");
    }
Generate an AES key from a secret
stroom-core-shared/src/main/java/stroom/crypto/shared/CryptoUtils.java