Top Description Fields Constructors Methods
com.ongres.scram.common.bouncycastle.pbkdf2

public Class PKCS5S2ParametersGenerator

extends PBEParametersGenerator
Class Inheritance

Generator for PBE derived keys and ivs as defined by PKCS 5 V2.0 Scheme 2. This generator uses a SHA-1 HMac as the calculation function.

The document this implementation is based on can be found at RSA's PKCS5 Page

Field Summary

Modifier and TypeField and Description
private Mac
private byte[]
Inherited from com.ongres.scram.common.bouncycastle.pbkdf2.PBEParametersGenerator:
iterationCountpasswordsalt

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
F(byte[] S, int c, byte[] iBuf, byte[] out, int outOff)

private byte[]
generateDerivedKey(int dkLen)

public CipherParameters

Returns:

a KeyParameter object.
generateDerivedParameters
(int
the size of the key we want (in bits)
keySize
)

Implements abstract com.ongres.scram.common.bouncycastle.pbkdf2.PBEParametersGenerator.generateDerivedParameters.

Generate a key parameter derived from the password, salt, and iteration count we are currently initialised with.
Inherited from com.ongres.scram.common.bouncycastle.pbkdf2.PBEParametersGenerator:
getIterationCountgetPasswordgetSaltinitPKCS5PasswordToUTF8Bytes

Field Detail

hMacback to summary
private Mac hMac
stateback to summary
private byte[] state

Constructor Detail

PKCS5S2ParametersGeneratorback to summary
public PKCS5S2ParametersGenerator(Digest digest)

Method Detail

Fback to summary
private void F(byte[] S, int c, byte[] iBuf, byte[] out, int outOff)
generateDerivedKeyback to summary
private byte[] generateDerivedKey(int dkLen)
generateDerivedParametersback to summary
public CipherParameters generateDerivedParameters(int keySize)

Implements abstract com.ongres.scram.common.bouncycastle.pbkdf2.PBEParametersGenerator.generateDerivedParameters.

Generate a key parameter derived from the password, salt, and iteration count we are currently initialised with.

Parameters
keySize:int

the size of the key we want (in bits)

Returns:CipherParameters

a KeyParameter object.