#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) #pragma warning disable using System; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto { /// /// With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes. /// This interface provides the extra methods required to support variable output on a digest implementation. /// public interface IXof : IDigest { /// /// Output the results of the final calculation for this XOF to outLen number of bytes. /// /// output array to write the output bytes to. /// offset to start writing the bytes at. /// the number of output bytes requested. /// the number of bytes written int OutputFinal(byte[] output, int outOff, int outLen); #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || _UNITY_2021_2_OR_NEWER_ /// /// Output the results of the final calculation for this XOF to fill the output span. /// /// span to fill with the output bytes. /// the number of bytes written int OutputFinal(Span output); #endif /// /// Start outputting the results of the final calculation for this XOF. Unlike DoFinal, this method /// will continue producing output until the XOF is explicitly reset, or signals otherwise. /// /// output array to write the output bytes to. /// offset to start writing the bytes at. /// the number of output bytes requested. /// the number of bytes written int Output(byte[] output, int outOff, int outLen); #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || _UNITY_2021_2_OR_NEWER_ /// /// Start outputting the results of the final calculation for this XOF. Unlike OutputFinal, this method /// will continue producing output until the XOF is explicitly reset, or signals otherwise. /// /// span to fill with the output bytes. /// the number of bytes written int Output(Span output); #endif } } #pragma warning restore #endif