The SecretKeyFactory Class
The SecretKeyFactory is used to convert secret
keys (opaque cryptographic keys of type SecretKey)
into key specifications (transparent representations of the underlying
key material), and vice versa.
The SecretKeyFactory can be used to generate a
PKCS#11 secret key from a PKCS11KeySpec or a SecretKeySpec.
Notice there is a difference from SDK 1.4.2, where the KeySpec used
to generate the PKCS#11 secret key was PKCS11KeySpec, DESKeySpec or DESedeKeySpec.
The reason to use a more general class to represent secret key spec
is because IBMPKCS11Impl now supports more symmetric key algorithms
including DES, DESede, Blowfish, AES, and RC4, while on SDK 1.4.2,
it only supports DES and DESede.