| Modifier and Type | Method and Description |
|---|---|
| public byte[] | calculateHMAC(int
the hash algorithm to instantiate HMAC with. See cryptoHashAlgorithm, byte[] CryptoHashAlgorithm for values.array containing the input data. buf, int offset into the input array the input starts at. off, int the length of the input data. len)Calculate an HMAC with this secret's data as the key. |
| public TlsSecret | Returns: the new secret.PRF algorithm to use. prfAlgorithm, String the label details. label, byte[] the seed details. seed, int the size (in bytes) of the secret to generate. length)Return a new secret based on applying a PRF to this one. |
| public void | |
| public byte[] | Returns: an encrypted copy of this secret's internal data.the encryptor to use for protecting the internal data. encryptor)Return an encrypted copy of the data this secret is based on. |
| public byte[] | |
| public TlsSecret | Returns: output keying material (of 'length' octets).the hash algorithm to instantiate HMAC with. See cryptoHashAlgorithm, byte[] CryptoHashAlgorithm for values.optional context and application specific information (can be zero-length). info, int length of output keying material in octets. length)RFC 5869 HKDF-Expand function, with this secret's data as the pseudo-random key ('prk'). |
| public TlsSecret | Returns: a pseudo-random key (of HashLen octets).the hash algorithm to instantiate HMAC with. See cryptoHashAlgorithm, TlsSecret CryptoHashAlgorithm for values.input keying material. ikm)RFC 5869 HKDF-Extract function, with this secret's data as the 'salt'. |
| public boolean |
| calculateHMAC | back to summary |
|---|---|
| public byte[] calculateHMAC(int cryptoHashAlgorithm, byte[] buf, int off, int len) Calculate an HMAC with this secret's data as the key.
| |
| deriveUsingPRF | back to summary |
|---|---|
| public TlsSecret deriveUsingPRF(int prfAlgorithm, String label, byte[] seed, int length) Return a new secret based on applying a PRF to this one. | |
| destroy | back to summary |
|---|---|
| public void destroy() Destroy the internal state of the secret. After this call, any attempt to use the
| |
| encrypt | back to summary |
|---|---|
| public byte[] encrypt(TlsEncryptor encryptor) throws IOException Return an encrypted copy of the data this secret is based on.
| |
| extract | back to summary |
|---|---|
| public byte[] extract() Return the internal data from this secret. The
| |
| hkdfExpand | back to summary |
|---|---|
| public TlsSecret hkdfExpand(int cryptoHashAlgorithm, byte[] info, int length) RFC 5869 HKDF-Expand function, with this secret's data as the pseudo-random key ('prk').
| |
| hkdfExtract | back to summary |
|---|---|
| public TlsSecret hkdfExtract(int cryptoHashAlgorithm, TlsSecret ikm) RFC 5869 HKDF-Extract function, with this secret's data as the 'salt'. The
| |
| isAlive | back to summary |
|---|---|
| public boolean isAlive() | |