|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.security.AlgorithmParameterGeneratorSpi | +--iaik.security.pbe.PBEParameterGenerator
This class implements an AlgorithmParameterGenerator to be used for generating parameters for en/decrypting messages with password based encryption algorithms according to PKCS#5 and PKCS#12.
PKCS#5 describes a method for encrypting messages (octet strings) with secret keys derived from a password. For generating the key from the password, special paramters (salt an octet string and iteration count an integer) are required.
Applications shall use
for obtaining an AlgorithmParameterGenerator for generating PBE parameters in opaque representation. Once the generator has been created, it shall be properly initialized by one of the severalAlgorithmParameterGenerator.getInstance("PBE")
init
methods.
If none explicit initialization is done, per default the salt length is set to 8 bytes,
and the iteration count value is set to 1. After initializing the generator
(or relying on default settings), the required parameters
actually are created by calling the generateParameters
method.
PBEParameters
,
PBEGenParameterSpec
,
AlgorithmParameterGenerator
Constructor Summary | |
PBEParameterGenerator()
The default constructor. |
Method Summary | |
protected AlgorithmParameters |
engineGenerateParameters()
Actually generates the required PBE AlgorithmParameters. |
protected void |
engineInit(AlgorithmParameterSpec param,
SecureRandom random)
Initializes this generator with PBE-specific parameter generation values and some random seed. |
protected void |
engineInit(int saltLength,
SecureRandom random)
Initializes the parameter generator with given salt length and random seed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PBEParameterGenerator()
AlgorithmParameterGenerator.getInstance
factory
methods for obtaining an AlgorithmParamterGenerator for generating paramters
for password based encryption.Method Detail |
protected void engineInit(int saltLength, SecureRandom random)
engineInit
in class AlgorithmParameterGeneratorSpi
saltLength
- the length of the salt in bytesrandom
- the random seed to be used by this generator.protected void engineInit(AlgorithmParameterSpec param, SecureRandom random) throws InvalidAlgorithmParameterException
From the given parameter specification (which has to be of type
PBEGenParameterSpec
) salt length and iteration count
are obtained for generating the algorithm parameters.
Applications shall call init(param_spec, random)
for provider
independently accessing this method.
engineInit
in class AlgorithmParameterGeneratorSpi
param
- an instance of PBEGenParameterSpecrandom
- the random seed to be used by this generator.InvalidAlgorithmParameterException
- if param
is not an
instance of PBEGenParameterSpecprotected AlgorithmParameters engineGenerateParameters()
Applications shall call generatePrameters()
for provider
independently accessing this method.
engineGenerateParameters
in class AlgorithmParameterGeneratorSpi
|
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 |