|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.crypto.SecretKeyFactorySpi | +--iaik.security.cipher.GeneralKeyFactory
This class is the SecretKeyFactory for all symmetric ciphers supported by the IAIK. It supports SecretKeySpec, DESKeySpec, and DESedeKeySpec. The keys generated by engineGenerateSecret() will be of a length valid for the particular algorithm possibly truncating the key or filling it up with zeros.
Constructor Summary | |
GeneralKeyFactory()
Constructor used by getInstance(). |
Method Summary | |
protected SecretKey |
engineGenerateSecret(KeySpec keySpec)
Converts the given key specification (key material) into a SecretKey object. |
protected KeySpec |
engineGetKeySpec(SecretKey secretKey,
Class classSpec)
Converts the given secret key into the requested key specification (key material). |
protected SecretKey |
engineTranslateKey(SecretKey secretKey)
Translates a key object of some unknown or untrusted provider into a secret key object of this key factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GeneralKeyFactory()
Method Detail |
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException
The supplied keySpec may be an instance of javax.crypto.spec.SecretKeySpec
,
javax.crypto.spec.DESKeySpec
or javax.crypto.spec.DESedeKeySpec
.
engineGenerateSecret
in class SecretKeyFactorySpi
keySpec
- the specification (key material) to be converted into SecretKey representation.InvalidKeySpecException
- if the given key material cannot be converted into a
SecretKey object by this key factoryprotected KeySpec engineGetKeySpec(SecretKey secretKey, Class classSpec) throws InvalidKeySpecException
This method may be used for getting a javax.crypto.spec.SecretKeySpec
,
javax.crypto.spec.DESKeySpec
, or javax.crypto.spec.DESedeKeySpec
from the given secret key.
engineGetKeySpec
in class SecretKeyFactorySpi
secretKey
- the secret key to be convertedclassSpec
- the class implementing the requested secret key specInvalidKeySpecException
- if the given secret key cannot be converted into the
requested key specification object by this key factoryprotected SecretKey engineTranslateKey(SecretKey secretKey) throws InvalidKeyException
engineTranslateKey
in class SecretKeyFactorySpi
secretKey
- the key of some unknown or untrusted providerInvalidKeyException
- if the given key cannot be translated by this key factory
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |