#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) #pragma warning disable using System; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto.Impl { /// Base interface for a generic TLS MAC implementation for use with a bulk cipher. public interface TlsSuiteMac { /// Return the output length (in bytes) of this MAC. /// The output length of this MAC. int Size { get; } /// Calculate the MAC for some given data. /// The sequence number of the record. /// The content type of the message. /// A byte array containing the message. /// The number of bytes to skip, before the message starts. /// The length of the message. /// A new byte array containing the MAC value. byte[] CalculateMac(long seqNo, short type, byte[] message, int offset, int length); /// Constant time calculation of the MAC for some given data with a given expected length. /// The sequence number of the record. /// The content type of the message. /// A byte array containing the message. /// The number of bytes to skip, before the message starts. /// The length of the message. /// The expected length of the full message. /// Random data for padding out the MAC calculation if required. /// A new byte array containing the MAC value. byte[] CalculateMacConstantTime(long seqNo, short type, byte[] message, int offset, int length, int expectedLength, byte[] randomData); } } #pragma warning restore #endif