#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
{
public interface ISigner
{
/// The algorithm name.
string AlgorithmName { get; }
/// Initialise the signer for signing or verification.
/// true if for signing, false otherwise.
/// necessary parameters.
void Init(bool forSigning, ICipherParameters parameters);
/// Update the signer with a single byte.
/// the input byte to be entered.
void Update(byte input);
/// Update the signer with a block of bytes.
/// the byte array containing the data.
/// the offset into the byte array where the data starts.
/// the length of the data.
void BlockUpdate(byte[] input, int inOff, int inLen);
#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || _UNITY_2021_2_OR_NEWER_
/// Update the signer with a span of bytes.
/// the span containing the data.
void BlockUpdate(ReadOnlySpan input);
#endif
/// Generate a signature for the message we've been loaded with using the key we were initialised with.
///
/// A byte array containing the signature for the message.
byte[] GenerateSignature();
/// Return true if the internal state represents the signature described in the passed in array.
///
/// an array containing the candidate signature to verify.
/// true if the internal state represents the signature described in the passed in array.
bool VerifySignature(byte[] signature);
/// Reset the signer back to its initial state.
void Reset();
}
}
#pragma warning restore
#endif