DefaultMacResult
using Org.BouncyCastle.Security;
using System;
namespace Org.BouncyCastle.Crypto.Operators
{
public sealed class DefaultMacResult : IBlockResult
{
private readonly IMac m_mac;
public DefaultMacResult(IMac mac)
{
m_mac = mac;
}
public byte[] Collect()
{
return MacUtilities.DoFinal(m_mac);
}
public int Collect(byte[] buf, int off)
{
return m_mac.DoFinal(buf, off);
}
public int Collect(Span<byte> output)
{
return m_mac.DoFinal(output);
}
public int GetMaxResultLength()
{
return m_mac.GetMacSize();
}
}
}