Top Description Methods
org.bouncycastle.tls.crypto

public Interface TlsMAC

Known Direct Subinterfaces
org.bouncycastle.tls.crypto.TlsHMAC

Interface for MAC services.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the MAC value.
calculateMAC
()

Return calculated MAC for any input passed in.

public void
calculateMAC(byte[]
output array to write the MAC to.
output
,
int
offset into the output array to write the MAC to.
outOff
)

Write the calculated MAC to an output buffer.

public int

Returns:

the MAC length.
getMacLength
()

Return the length of the MAC generated by this service.

public void
reset()

Reset the MAC underlying this service.

public void
setKey(byte[]
array holding the MAC key.
key
,
int
offset into the array the key starts at.
keyOff
,
int
length of the key in the array.
keyLen
)

Set the key to be used by the MAC implementation supporting this service.

public void
update(byte[]
input array containing the data.
input
,
int
offset into the input array the input starts at.
inOff
,
int
the length of the input data.
length
)

Update the MAC with the passed in input.

Method Detail

calculateMACback to summary
public byte[] calculateMAC()

Return calculated MAC for any input passed in.

Returns:byte[]

the MAC value.

calculateMACback to summary
public void calculateMAC(byte[] output, int outOff)

Write the calculated MAC to an output buffer.

Parameters
output:byte[]

output array to write the MAC to.

outOff:int

offset into the output array to write the MAC to.

getMacLengthback to summary
public int getMacLength()

Return the length of the MAC generated by this service.

Returns:int

the MAC length.

resetback to summary
public void reset()

Reset the MAC underlying this service.

setKeyback to summary
public void setKey(byte[] key, int keyOff, int keyLen)

Set the key to be used by the MAC implementation supporting this service.

Parameters
key:byte[]

array holding the MAC key.

keyOff:int

offset into the array the key starts at.

keyLen:int

length of the key in the array.

updateback to summary
public void update(byte[] input, int inOff, int length)

Update the MAC with the passed in input.

Parameters
input:byte[]

input array containing the data.

inOff:int

offset into the input array the input starts at.

length:int

the length of the input data.