PBKDF2WithHmacSHA256 impact of key length to the output length
问题 Consider the following java code: KeySpec spec = new PBEKeySpec("pass".toCharArray(), "salt".getBytes(), 10000, 512); SecretKeyFactory f = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256"); System.out.println(f.generateSecret(spec).getEncoded().length); This code outputs " 64 ". So 64 bytes, while SHA-256 is a 32 byte hash. I know I specified 512 bits (64 byte) as the key length. However I would expect that the generated key (PBKDF2) will be hashed by SHA-256 so that the output should