|
Bouncy Castle Cryptography Library 1.64 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.crypto.tls.TlsMac
A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest.
Field Summary | |
protected TlsContext |
context
Deprecated. |
protected int |
digestBlockSize
Deprecated. |
protected int |
digestOverhead
Deprecated. |
protected Mac |
mac
Deprecated. |
protected int |
macLength
Deprecated. |
protected byte[] |
secret
Deprecated. |
Constructor Summary | |
TlsMac(TlsContext context,
Digest digest,
byte[] key,
int keyOff,
int keyLen)
Deprecated. Generate a new instance of an TlsMac. |
Method Summary | |
byte[] |
calculateMac(long seqNo,
short type,
byte[] message,
int offset,
int length)
Deprecated. Calculate the MAC for some given data. |
byte[] |
calculateMacConstantTime(long seqNo,
short type,
byte[] message,
int offset,
int length,
int fullLength,
byte[] dummyData)
Deprecated. |
protected int |
getDigestBlockCount(int inputLength)
Deprecated. |
byte[] |
getMACSecret()
Deprecated. |
int |
getSize()
Deprecated. |
protected byte[] |
truncate(byte[] bs)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TlsContext context
protected byte[] secret
protected Mac mac
protected int digestBlockSize
protected int digestOverhead
protected int macLength
Constructor Detail |
public TlsMac(TlsContext context, Digest digest, byte[] key, int keyOff, int keyLen)
context
- the TLS client contextdigest
- The digest to use.key
- A byte-array where the key for this MAC is located.keyOff
- The number of bytes to skip, before the key starts in the buffer.keyLen
- The length of the key.Method Detail |
public byte[] getMACSecret()
public int getSize()
public byte[] calculateMac(long seqNo, short type, byte[] message, int offset, int length)
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.length
- The length of the message.public byte[] calculateMacConstantTime(long seqNo, short type, byte[] message, int offset, int length, int fullLength, byte[] dummyData)
protected int getDigestBlockCount(int inputLength)
protected byte[] truncate(byte[] bs)
|
Bouncy Castle Cryptography Library 1.64 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |