public class TlsMac extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HMac |
mac |
protected long |
seqNo |
| Constructor and Description |
|---|
TlsMac(Digest digest,
byte[] key_block,
int offset,
int len)
Generate a new instance of an TlsMac.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calculateMac(short type,
byte[] message,
int offset,
int len)
Calculate the mac for some given data.
|
int |
getSize() |
protected long seqNo
protected HMac mac
public TlsMac(Digest digest, byte[] key_block, int offset, int len)
digest - The digest to use.key_block - A byte-array where the key for this mac is located.offset - The number of bytes to skip, before the key starts in the buffer.len - The length of the key.public int getSize()
public byte[] calculateMac(short type,
byte[] message,
int offset,
int len)
type - The message type of the message.message - A byte-buffer containing the message.offset - The number of bytes to skip, before the message starts.len - The length of the message.Copyright © 2015. All rights reserved.