Interface TlsMac
- Namespace
- Org.BouncyCastle.Tls.Crypto
- Assembly
- BouncyCastle.Cryptography.dll
Interface for MAC services.
public interface TlsMac
Properties
MacLength
Return the length of the MAC generated by this service.
int MacLength { get; }
Property Value
- int
the MAC length.
Methods
CalculateMac()
Return calculated MAC for any input passed in.
byte[] CalculateMac()
Returns
- byte[]
the MAC value.
CalculateMac(byte[], int)
Write the calculated MAC to an output buffer.
void CalculateMac(byte[] output, int outOff)
Parameters
outputbyte[]output array to write the MAC to.
outOffintoffset into the output array to write the MAC to.
Reset()
Reset the MAC underlying this service.
void Reset()
SetKey(byte[], int, int)
Set the key to be used by the MAC implementation supporting this service.
void SetKey(byte[] key, int keyOff, int keyLen)
Parameters
keybyte[]array holding the MAC key.
keyOffintoffset into the array the key starts at.
keyLenintlength of the key in the array.
SetKey(ReadOnlySpan<byte>)
void SetKey(ReadOnlySpan<byte> key)
Parameters
keyReadOnlySpan<byte>
Update(byte[], int, int)
Update the MAC with the passed in input.
void Update(byte[] input, int inOff, int length)
Parameters
inputbyte[]input array containing the data.
inOffintoffset into the input array the input starts at.
lengthintthe length of the input data.
Update(ReadOnlySpan<byte>)
void Update(ReadOnlySpan<byte> input)
Parameters
inputReadOnlySpan<byte>