#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
{
/// Base interface for a symmetric key block cipher.
public interface IBlockCipher
{
/// The name of the algorithm this cipher implements.
string AlgorithmName { get; }
/// Initialise the cipher.
/// Initialise for encryption if true, for decryption if false.
/// The key or other data required by the cipher.
void Init(bool forEncryption, ICipherParameters parameters);
/// The block size for this cipher, in bytes.
int GetBlockSize();
/// Process a block.
/// The input buffer.
/// The offset into inBuf that the input block begins.
/// The output buffer.
/// The offset into outBuf to write the output block.
/// If input block is wrong size, or outBuf too small.
/// The number of bytes processed and produced.
int ProcessBlock(byte[] inBuf, int inOff, byte[] outBuf, int outOff);
#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || _UNITY_2021_2_OR_NEWER_
/// Process a block.
/// The input block as a span.
/// The output span.
/// If input block is wrong size, or output span too small.
/// The number of bytes processed and produced.
int ProcessBlock(ReadOnlySpan input, Span output);
#endif
}
}
#pragma warning restore
#endif