I wanted to encrypt a file based on a password, so I used the following code:
private void encrypt(String password) { SecretKeyFactory f = SecretKeyFactory.g