Modifier and Type | Field and Description |
---|---|
protected int | |
protected int |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private static int | |
protected void | chooseAlgorithmAndStrength()
Implements abstract sun. Decides what algorithm and strength to use (SHA-256 or AES-256, 128 or 256). |
protected abstract void | hashReseedInternal(List<byte[]>
not null, each element neither null inputs)Operates on multiple inputs. |
public void | instantiateAlgorithm(byte[] entropy)
Implements abstract sun. Instantiates a DRBG. |
protected void | reseedAlgorithm(byte[] ei, byte[]
additional input, can be null. If not null,
its length is smaller than additionalInput)maxAdditionalInputLength Overrides sun. The reseed function. |
outLen | back to summary |
---|---|
protected int outLen |
seedLen | back to summary |
---|---|
protected int seedLen |
AbstractHashDrbg | back to summary |
---|---|
public AbstractHashDrbg() |
alg2strength | back to summary |
---|---|
private static int alg2strength(String algorithm) |
chooseAlgorithmAndStrength | back to summary |
---|---|
protected void chooseAlgorithmAndStrength() Implements abstract sun. Doc from sun. Decides what algorithm and strength to use (SHA-256 or AES-256,
128 or 256). Strength related fields must also be defined or redefined
here. Called in
If
If
Since every call to
Here are some examples of the algorithm and strength chosen (suppose
requested effective (SHA-224, 256) IAE (SHA-256, -1) (SHA-256,128) (SHA-256, 112) (SHA-256,112) (SHA-256, 128) (SHA-256,128) (SHA-3, -1) IAE (null, -1) (SHA-256,128) (null, 112) (SHA-256,112) (null, 192) (SHA-256,192) (null, 256) (SHA-256,256) (null, 384) IAE |
hashReseedInternal | back to summary |
---|---|
protected abstract void hashReseedInternal(List<byte[]> inputs) Operates on multiple inputs.
|
instantiateAlgorithm | back to summary |
---|---|
public void instantiateAlgorithm(byte[] entropy) Implements abstract sun. Doc from sun. Instantiates a DRBG. Called automatically before the first
Note that the other parameters (nonce, strength, ps) are already stored inside at configuration. |
reseedAlgorithm | back to summary |
---|---|
protected void reseedAlgorithm(byte[] ei, byte[] additionalInput) Overrides sun. Doc from sun. The reseed function.
|