|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.crypto.SecretKeyFactorySpi
|
+--iaik.pkcs.pkcs12.KeyFactory
SecretKeyFactory implementation for the PBE ciphers (PKCS#12).
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, iaik.security.cipher.PBEKeyBMP)
into transparent PBE key material (instances of javax.crypto.spec.PBEKeySpec) according to the PKCS#12 Personal
Information Exchange Syntax Standard.
An application shall use the getInstance factory method of the
javax.crypto.SecretKeyFactory engine class for accessing this
PBE KeyFactory, e.g.:
PBEKeySpec keySpec = new PBEKeySpec("password".toCharArray());
SecretKeyFactory kf = SecretKeyFactory.getInstance("PKCS#12", "IAIK");
SecretKey sk = kf.generateSecret(keySpec);
| Constructor Summary | |
KeyFactory()
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 KeyFactory()
| Method Detail |
protected SecretKey engineGenerateSecret(KeySpec keySpec)
throws InvalidKeySpecException
The supplied keySpec has to be an instance of
javax.crypto.spec.PBEKeySpec.
keySpec - the specification (key material) to be converted into SecretKey representation.iaik.security.cipher.PBEKeyBMP
protected KeySpec engineGetKeySpec(SecretKey secretKey,
java.lang.Class classSpec)
throws InvalidKeySpecException
This method may be used for getting a javax.crypto.spec.PBEKeySpec
from the given secret key. The supplied secret key has to be an instance of
iaik.security.cipher.PBEKeyBMP.
secretKey - the secret key to be convertedclassSpec - the class implementing the requested secret key spec
protected SecretKey engineTranslateKey(SecretKey secretKey)
throws InvalidKeyException
secretKey - the key of some unknown or untrusted provideriaik.security.cipher.PBEKeyBMP
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||