PBEKey Spec Common
Constructor that takes a password. An empty char[] is used if null is specified.
Note: password
is cloned before it is stored in the new PBEKeySpec
object.
Parameters
the password.
Constructor that takes a password, salt, iteration count, and to-be-derived key length for generating PBEKey of variable-key-size PBE ciphers. An empty char[] is used if null is specified for password
.
Note: the password
and salt
are cloned before they are stored in the new PBEKeySpec
object.
Parameters
the password.
the salt.
the iteration count.
the to-be-derived key length.
Throws
if salt
is null.
if salt
is empty, i.e. 0-length, iterationCount
or keyLength
is not positive.
Constructor that takes a password, salt, iteration count for generating PBEKey of fixed-key-size PBE ciphers. An empty char[] is used if null is specified for password
.
Note: the password
and salt
are cloned before they are stored in the new PBEKeySpec
object.
Parameters
the password.
the salt.
the iteration count.
Throws
if salt
is null.
if salt
is empty, i.e. 0-length, or iterationCount
is not positive.