Search code examples
javaencryptionpbkdf2

default values for salt, iteration count and key length for PBEKeySpec


http://docs.oracle.com/javase/7/docs/api/javax/crypto/spec/PBEKeySpec.html

Per that the salt, iteration count and key length are optional parameters. What are the defaults if they're not specified?

For algorithms with fixed key lengths the key length is easy enough to figure out but algorithms like AES can have multiple key lengths.

Any ideas?


Solution

  • You can find the source code here: http://developer.classpath.org/doc/javax/crypto/spec/PBEKeySpec-source.html

    The default values are the default values set by the JVM for their types (empty array and 0).