public class PKCS5S2ParametersGenerator extends PBEParametersGenerator
The document this implementation is based on can be found at RSA's PKCS5 Page
Modifier and Type | Field and Description |
---|---|
private Mac |
hMac |
private byte[] |
state |
iterationCount, password, salt
Constructor and Description |
---|
PKCS5S2ParametersGenerator(Digest digest) |
Modifier and Type | Method and Description |
---|---|
private void |
F(byte[] S,
int c,
byte[] iBuf,
byte[] out,
int outOff) |
private byte[] |
generateDerivedKey(int dkLen) |
CipherParameters |
generateDerivedParameters(int keySize)
Generate a key parameter derived from the password, salt, and iteration
count we are currently initialised with.
|
getIterationCount, getPassword, getSalt, init, PKCS5PasswordToUTF8Bytes
private Mac hMac
private byte[] state
public PKCS5S2ParametersGenerator(Digest digest)
private void F(byte[] S, int c, byte[] iBuf, byte[] out, int outOff)
private byte[] generateDerivedKey(int dkLen)
public CipherParameters generateDerivedParameters(int keySize)
generateDerivedParameters
in class PBEParametersGenerator
keySize
- the size of the key we want (in bits)