| java.lang.Object org.bouncycastle.crypto.tls.TlsMac
TlsMac | public class TlsMac (Code) | | A generic TLS MAC implementation, which can be used with any kind of
Digest to act as an HMAC.
|
Constructor Summary | |
protected | TlsMac(Digest digest, byte[] key_block, int offset, int len) Generate a new instance of an TlsMac. |
Method Summary | |
protected byte[] | calculateMac(short type, byte[] message, int offset, int len) Calculate the mac for some given data.
TlsMac will keep track of the sequence number internally.
Parameters: type - The message type of the message. Parameters: message - A byte-buffer containing the message. Parameters: offset - The number of bytes to skip, before the message starts. Parameters: len - The length of the message. | protected int | getSize() |
TlsMac | protected TlsMac(Digest digest, byte[] key_block, int offset, int len)(Code) | | Generate a new instance of an TlsMac.
Parameters: digest - The digest to use. Parameters: key_block - A byte-array where the key for this mac is located. Parameters: offset - The number of bytes to skip, before the key starts in the buffer. Parameters: len - The length of the key. |
calculateMac | protected byte[] calculateMac(short type, byte[] message, int offset, int len)(Code) | | Calculate the mac for some given data.
TlsMac will keep track of the sequence number internally.
Parameters: type - The message type of the message. Parameters: message - A byte-buffer containing the message. Parameters: offset - The number of bytes to skip, before the message starts. Parameters: len - The length of the message. A new byte-buffer containing the mac value. |
getSize | protected int getSize()(Code) | | The Keysize of the mac. |
|
|