| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private MessageDigest | |
| private static final byte[] | |
| private byte[] | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | addBytes(byte[]
existing array out, int len, byte[]... more arrays, can be of different length data)Adds byte arrays into an existing one. |
| public final synchronized void | generateAlgorithm(byte[]
the array to be filled in with random bytes. result, byte[] additionalInput)Implements abstract sun. Generates a user-specified number of random bytes. |
| private byte[] | |
| public static byte[] | Returns: the condensed/expanded outputa digest, int MessageDigest object in reset stateMessageDigest#getDigestLength of digestrequested output length, in bytes requested, List<byte[]> input data inputs)A hash-based derivation function defined in NIST SP 800-90Ar1 10.3.1. |
| private void | |
| protected final synchronized void | hashReseedInternal(List<byte[]> inputs)
Implements abstract sun. Operates on multiple inputs. |
| protected void | initEngine()
Implements abstract sun. This call, used by the constructors, instantiates the digest. |
| private void |
| c | back to summary |
|---|---|
| private byte[] c | |
| digest | back to summary |
|---|---|
| private MessageDigest digest | |
| ONE | back to summary |
|---|---|
| private static final byte[] ONE | |
| v | back to summary |
|---|---|
| private byte[] v | |
| ZERO | back to summary |
|---|---|
| private static final byte[] ZERO | |
| HashDrbg | back to summary |
|---|---|
public HashDrbg(SecureRandomParameters params)
| |
| addBytes | back to summary |
|---|---|
| private static void addBytes(byte[] out, int len, byte[]... data) Adds byte arrays into an existing one.
| |
| generateAlgorithm | back to summary |
|---|---|
| public final synchronized void generateAlgorithm(byte[] result, byte[] additionalInput) Implements abstract sun. Generates a user-specified number of random bytes.
| |
| hashDf | back to summary |
|---|---|
| private byte[] hashDf(int requested, List<byte[]> inputs) | |
| hashDf | back to summary |
|---|---|
| public static byte[] hashDf(MessageDigest digest, int outLen, int requested, List<byte[]> inputs) A hash-based derivation function defined in NIST SP 800-90Ar1 10.3.1. The function is used inside Hash_DRBG, and can also be used as an approved conditioning function as described in 800-90B 6.4.2.2. Note In each current call, requested is seedLen, therefore small, no need to worry about overflow.
| |
| hashGen | back to summary |
|---|---|
| private void hashGen(byte[] output, byte[] v) | |
| hashReseedInternal | back to summary |
|---|---|
| protected final synchronized void hashReseedInternal(List<byte[]> inputs) Implements abstract sun. Doc from sun. Operates on multiple inputs.
| |
| initEngine | back to summary |
|---|---|
| protected void initEngine() Implements abstract sun. This call, used by the constructors, instantiates the digest.
| |
| status | back to summary |
|---|---|
| private void status() | |