<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.0" />

TlsMac

public interface TlsMac
Interface for MAC services.
int MacLength { get; }

Return the length of the MAC generated by this service.

byte[] CalculateMac()

Return calculated MAC for any input passed in.

void CalculateMac(byte[] output, int outOff)

Write the calculated MAC to an output buffer.

void Reset()

Reset the MAC underlying this service.

void SetKey(byte[] key, int keyOff, int keyLen)

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

void Update(byte[] input, int inOff, int length)

Update the MAC with the passed in input.