| Modifier and Type | Field and Description |
|---|---|
| private final TlsCryptoParameters | |
| private final int | |
| private final int | |
| private final TlsHMAC | |
| private final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | TlsSuiteHMac(TlsCryptoParameters
the TLS client context specific crypto parameters. cryptoParams, TlsHMAC The MAC to use. mac)Generate a new instance of a TlsMac. |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | calculateMac(long
The sequence number of the record. seqNo, short The content type of the message. type, byte[] connectionID, byte[] A byte array containing the message. msg, int The number of bytes to skip, before the message starts. msgOff, int The length of the message. msgLen)Implements org. Calculate the MAC for some given data. |
| public byte[] | calculateMacConstantTime(long
The sequence number of the record. seqNo, short The content type of the message. type, byte[] connectionID, byte[] A byte array containing the message. msg, int The number of bytes to skip, before the message starts. msgOff, int The length of the message. msgLen, int The expected length of the full message. fullLength, byte[] Random data for padding out the MAC calculation if required. dummyData)Implements org. Constant time calculation of the MAC for some given data with a given expected length. |
| private int | |
| private int | |
| private static int | |
| public int | getSize()
Implements org. Return the output length (in bytes) of this MAC. |
| private byte[] |
| cryptoParams | back to summary |
|---|---|
| private final TlsCryptoParameters cryptoParams | |
| digestBlockSize | back to summary |
|---|---|
| private final int digestBlockSize | |
| digestOverhead | back to summary |
|---|---|
| private final int digestOverhead | |
| mac | back to summary |
|---|---|
| private final TlsHMAC mac | |
| macSize | back to summary |
|---|---|
| private final int macSize | |
| SEQUENCE_NUMBER_PLACEHOLDER | back to summary |
|---|---|
| private static final long SEQUENCE_NUMBER_PLACEHOLDER | |
| TlsSuiteHMac | back to summary |
|---|---|
| public TlsSuiteHMac(TlsCryptoParameters cryptoParams, TlsHMAC mac) Generate a new instance of a TlsMac.
| |
| calculateMac | back to summary |
|---|---|
| public byte[] calculateMac(long seqNo, short type, byte[] connectionID, byte[] msg, int msgOff, int msgLen) Implements org. Doc from org. Calculate the MAC for some given data.
| |
| calculateMacConstantTime | back to summary |
|---|---|
| public byte[] calculateMacConstantTime(long seqNo, short type, byte[] connectionID, byte[] msg, int msgOff, int msgLen, int fullLength, byte[] dummyData) Implements org. Doc from org. Constant time calculation of the MAC for some given data with a given expected length.
| |
| getDigestBlockCount | back to summary |
|---|---|
| private int getDigestBlockCount(int inputLength) | |
| getHeaderLength | back to summary |
|---|---|
| private int getHeaderLength(byte[] connectionID) | |
| getMacSize | back to summary |
|---|---|
| private static int getMacSize(TlsCryptoParameters cryptoParams, TlsMAC mac) | |
| getSize | back to summary |
|---|---|
| public int getSize() Implements org. Doc from org. Return the output length (in bytes) of this MAC.
| |
| truncate | back to summary |
|---|---|
| private byte[] truncate(byte[] bs) | |