|
||||||||||
| 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.DESKeyFactory
SecretKeyFactory implementation for the DES/DES EDE cipher.
Keys may appear in two representations within the Java Security environment:
java.security.Key
DESKeySpec
This SecretKey factory may be used for converting opaque secret keys (instances of javax.crypto.SecretKey) into transparent DES/DES EDE key material (instances of javax.crypto.spec.DESKeySpec respectively javax.crypto.spec.DESedeKeySpec).
An application shall use the getInstance factory method of the
javax.crypto.SecretKeyFactory engine class for accessing this
DESKeyFactory, e.g.:
byte[] key_material = ...;
DESKeySpec des_key_spec = new DESKeySpec(key_material);
SecretKeyFactory des_key_fac = SecretKeyFactory.getInstance("DES", "IAIK");
SecretKey des_key = des_key_fac.generateSecret(des_key_spec);
| Constructor Summary | |
DESKeyFactory()
Default constructor. |
|
| Method Summary | |
protected SecretKey |
engineGenerateSecret(KeySpec keySpec)
Converts the given key specification (key material) into a SecretKey object. |
protected KeySpec |
engineGetKeySpec(SecretKey secretKey,
java.lang.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 DESKeyFactory()
| 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.
keySpec - the specification (key material) to be converted into SecretKey representation.
protected KeySpec engineGetKeySpec(SecretKey secretKey,
java.lang.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.
secretKey - the secret key to be converted
protected SecretKey engineTranslateKey(SecretKey secretKey)
throws InvalidKeyException
secretKey - the key of some unknown or untrusted provider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||