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

GMac

public class GMac : IMac
The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication 800-38D.
public string AlgorithmName { get; }

public GMac(GcmBlockCipher cipher)

Creates a GMAC based on the operation of a block cipher in GCM mode.

public GMac(GcmBlockCipher cipher, int macSizeBits)

Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.

public void BlockUpdate(byte[] input, int inOff, int len)

public int DoFinal(byte[] output, int outOff)

public int GetMacSize()

public void Init(ICipherParameters parameters)

Initialises the GMAC - requires a ParametersWithIV providing a KeyParameter and a nonce.

public void Reset()

public void Update(byte input)