href="https://tools.ietf.org/html/rfc5246">rfc5246</a>
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[] | |
| pack-priv static byte[] | Returns: The expanded secretsThe starting secret to use for expansion secret, byte[] An ascii string without a length byte or trailing null character. label, byte[] The seed of the hash seed, int The number of bytes to return length, String the hmac algorithm to use algo)Use a single hash function to expand a secret and seed into an arbitrary quantity of output. |
| PseudoRandomFunction | back to summary |
|---|---|
| private PseudoRandomFunction() Constructor never to be called. | |
| concat | back to summary |
|---|---|
| private static byte[] concat(byte[] first, byte[] second) | |
| hash | back to summary |
|---|---|
| pack-priv static byte[] hash(byte[] secret, byte[] label, byte[] seed, int length, String algo) Use a single hash function to expand a secret and seed into an arbitrary quantity of output. P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) + HMAC_hash(secret, A(2) + seed) + HMAC_hash(secret, A(3) + seed) + ... where + indicates concatenation. A() is defined as: A(0) = seed A(i) = HMAC_hash(secret, A(i-1))
| |