I have found a Java implementation of AES CBC mode that runs in Netbeans. The lines below appear to create the key from password and salt:
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
KeySpec spec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), 65536, 128);
SecretKey tmp = factory.generateSecret(spec);
SecretKey secret = new SecretKeySpec(tmp.getEncoded(), "AES");
The key produced looks strange, here's an example:
secret key : javax.crypto.spec.SecretKeySpec@fffe8a18
I would expect 128 bit key like fffe8a1829ac45ed
If I enter such key of my own making the program crashes.
I would appreciate an idiot's guide as to what is going on.