#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
#pragma warning disable
using System;
using System.IO;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto.Impl
{
/// Interface for block cipher services.
public interface TlsBlockCipherImpl
{
/// Set the key to be used by the block cipher implementation supporting this service.
/// array holding the block cipher key.
/// offset into the array the key starts at.
/// length of the key in the array.
///
void SetKey(byte[] key, int keyOff, int keyLen);
/// Initialise the parameters for operator.
/// array holding the initialization vector (IV).
/// offset into the array the IV starts at.
/// length of the IV in the array.
/// if the parameters are inappropriate.
void Init(byte[] iv, int ivOff, int ivLen);
/// Perform the cipher encryption/decryption returning the output in output.
///
/// Note: we have to use DoFinal() here as it is the only way to guarantee output from the underlying cipher.
///
/// array holding input data to the cipher.
/// offset into input array data starts at.
/// length of the input data in the array.
/// array to hold the cipher output.
/// offset into output array to start saving output.
/// the amount of data written to output.
/// in case of failure.
int DoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset);
/// Return the blocksize (in bytes) of the underlying block cipher.
/// the cipher's blocksize.
int GetBlockSize();
}
}
#pragma warning restore
#endif