Table of Contents

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

output byte[]

output array to write the MAC to.

outOff int

offset 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

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.

SetKey(ReadOnlySpan<byte>)

void SetKey(ReadOnlySpan<byte> key)

Parameters

key ReadOnlySpan<byte>

Update(byte[], int, int)

Update the MAC with the passed in input.

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

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.

Update(ReadOnlySpan<byte>)

void Update(ReadOnlySpan<byte> input)

Parameters

input ReadOnlySpan<byte>