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

TlsSuiteMac

public interface TlsSuiteMac
Base interface for a generic TLS MAC implementation for use with a bulk cipher.
int Size { get; }

Return the output length (in bytes) of this MAC.

byte[] CalculateMac(long seqNo, short type, byte[] message, int offset, int length)

Calculate the MAC for some given data.

byte[] CalculateMacConstantTime(long seqNo, short type, byte[] message, int offset, int length, int expectedLength, byte[] randomData)

Constant time calculation of the MAC for some given data with a given expected length.